⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

text_area on form update



eamon250d

eamon250d
  • profile picture
  • Member

Posted 03 January 2016 - 05:22 AM

Hello ,

I add a field of type textarea. In the add form, I can see the text area field format, but not in the update form.

Here is my code. I wonder if you have an idea? Thank you

$crud->callback_add_field('Observation',array($this,'add_field_text_area'));

function add_field_text_area()

{

    return '<textarea rows="4" cols="50" name="comment">

 

                       </textarea>';

}

 


Amit Shah

Amit Shah
  • profile picture
  • Member

Posted 06 January 2016 - 02:34 AM

like callback_add_field - also make a call to callback_edit_field - that should solve your problem


eamon250d

eamon250d
  • profile picture
  • Member

Posted 13 January 2016 - 18:01 PM

Hi Amit Shah

Thanks for the replay

 

Add works

$crud->callback_add_field('EleveObservation',array($this,'add_field_text_area'));

function add_field_text_area()
{
    return '<textarea rows="4" cols="50" name="EleveObservation"></textarea>';
}

 

Edit not works

$crud->callback_edit_field('EleveObservation',array($this,'edit_field_text_area'));

function edit_field_text_area()
{
    return '<textarea rows="4" cols="50" name="EleveObservation"></textarea>';
}

When i try to show information for edit , EleveObservation is empty

If you have idea ?


Amit Shah

Amit Shah
  • profile picture
  • Member

Posted 18 January 2016 - 20:58 PM

well in the edit - u need to pass the value also... echo between the textarea code and it should work

 

Happy GCing :)