⚠ 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

Best way to pass value to the modal form ?



nunenthal

nunenthal
  • profile picture
  • Member

Posted 31 August 2019 - 12:48 PM

Hello,

I need to pass a value to the modal form to set selected an item of a select.

I use this :

$crud->callbackAddField('hidden', function () use ($last_caroussel_id) {
    return '<input type="hidden" name="last_caroussel_id" id="last_caroussel_id" value="'.$last_caroussel_id.'">';
});


This work fine, but in this case I have only a select field and an upload field.

In this case I create a field hidden in my database because it's needed to have a database field for callbackAddField ,this is working but it's a little anoying.


An Idea ?