• I cannot see how to get the text in a text-area field, to fill a cell using a standard wrap. In my database the text is confined to the left of the cell even though there is width available. The text also has a vertical scroll bar rather than the cell enlarging to fit the text.

    cheers
    Keiron

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author xnau webdesign

    (@xnau)

    If the cell has a scroll bat, that means that the content is inside another element the is limiting it’s height. You will need to use CSS that targets that element in order to give the content more space.

    Text wrapping inside a cell is governed by the “text-align” and “white-space” properties, you can adjust those properties to change how the text gets laid out in the cell.

    @keironspires

    I used a custom filter plugin to expand the textarea in my implementation. Maybe this sample will help you.

    // Change Notes TextArea to have more lines and be wider
    add_filter( 'pdb-form_element_build_text-area', 'pdb_form_element_build_text_area_el', 10, 1 );
    
    /**
     * Changes Form Attributes in a PDb_FormElement.class of HTML type 'textarea'
     *
     * @see https://xnau.com/creating-custom-form-elements/
     * 
     * @param   PDb_FormElement.class	$field 	
     * @return  PDb_FormElement.class	$field 	
     */
    function pdb_form_element_build_text_area_el( $field )
    {
    if ($field->name=='notes')
    	{
    		$field->output=' <textarea name="notes" rows="12" cols="120">' . $field->value . '</textarea>';
    	}
    	return $field;
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Wrap text in cell’ is closed to new replies.