Fuel admin model fields text/textarea

edited January 2014 in Bug Reports
I'm not sure what's happening, but in my model I have my fields listed properly, but here's the thing. My State field, I don't want the default "state" dropdown. I just want a text field. So when I modify my array as:
$fields['state'] = array('type' => 'text')
It changes to a WYSIWYG textarea.

I modified it to look kind of like a text box, but it's still a textarea as such:
$fields['state'] = array('type' => 'text', 'rows' => 1, 'class' => 'no_editor');

I have been looking for an answer to this. The documentation says they should be separate things.
I've updated just now to the final 1.0 release, but it didn't fix it.

Suggestions?

Thanks,
Chris.

Comments

  • edited 5:47AM
    I should mention I ONLY updated the /fuel/modules/fuel folder Is there anything else I NEED to update for the CMS?
  • edited January 2014
    Try changing the type to an empty string and adding the ignore_representative parameter following:
    $fields['state'] = array('type' => '', 'rows' => 1, 'class' => 'no_editor', 'ignore_representative' => TRUE);
    A type of "text" will actually display the WYSIWYG, which is a little confusing but makes sense if you think of it from a database field type perspective and what is returned when querying table field values. Setting it to empty will help that problem. However, since the field name is "state" it will display the "state" select dropdown field due to the representative setup for it. To get around that, you'll need to set "ignore_representative" => TRUE;
  • edited 5:47AM
    Perfect!
    I just found "Representatives" at the bottom of the page that I was looking on. A little confusing if you're not sure what you're looking for, but works perfect.
    Thanks :)
Sign In or Register to comment.