overwrite formbuilder config ?

edited April 2011 in Modules
Hi, when create an adv module ( without using controller , just load the model directly) is that possible to overwrite formbuilder config ? example change the date format , set some of the fields display only etc.

Comments

  • edited 10:40AM
    You could try using the following to grab the form_builder instance and manipulate it (although some things are set after the call to the form_fields() method and you may not be able to change):
    $CI =& get_instance(); $CI->form_builder->....

    With regards to "readonly" each field has a "readonly" property you can set. With regards to date format, that's a little trickier. You could create a 'custom' field type which allows you to pass it a function used to render the field. We've had several requests to allow users to change the date formatting and it's on the list.

    Also, we are currently working on some changes to make it easier to configure the different field types with form_builder.
  • edited 10:40AM
    thanks ... one thing i just wonder is that of doing
    $CI =& get_instance(); $CI->form_builder->

    i can always use $this->form_builder->.... , is there any difference ? best pratice ?
  • edited 10:40AM
    That should probably work to.
Sign In or Register to comment.