Fuel admin model fields text/textarea
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
$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;
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