Forms module - defaults to textarea not input

edited November 2014 in Modules
Forms module default field is a textarea, not input, which I think is unexpected. This also causes the ckeditor javascript to be included when not wanted.

fuel/config/custom_fields.php, wysiwyg custom field represents includes text inputs,

// fuel/modules/fuel/config/custom_fields.php // Wysiwyg field $fields['wysiwyg'] = array( 'class' => array(FUEL_FOLDER => 'Fuel_custom_fields'), 'function' => 'wysiwyg', 'filepath' => '', 'js' => array( FUEL_FOLDER => array( 'editors/markitup/jquery.markitup', 'editors/markitup/jquery.markitup.set', 'editors/ckeditor/ckeditor.js', 'editors/ckeditor/config.js', ) ), 'js_function' => 'fuel.fields.wysiwyg_field', 'represents' => array('text', 'textarea', 'longtext', 'mediumtext') );


Simple fix is to change the custom field in application/config/custom_fields.php but should be changed in module config.

Comments

  • edited 11:16PM
    Yes. I agree it's a little strange and something that was debated. The reason the "represents" includes a type of "text" is so that it easily maps to database columns that are of type "text" in which we would want a textarea instead of a text input. If you don't want a field to be a "textarea" you can simply just set the "type" => NULL for your field.
  • edited 11:16PM
    type => NULL doesn't work when using the forms module.
  • edited 11:16PM
    Works
    'ignore_representative' => TRUE
Sign In or Register to comment.