⚠ 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

Populating add form with existing record



rkrajnik
  • profile picture
  • Member

Posted 27 June 2020 - 17:51 PM

I've add a call to SetActionButton() to include an "add" option for that row.  I'd like populate all data/fields from grid row to the new add form, allow changes and then "Save" as normal.  My SetActionButton() is:

$crud->setActionButton('Add a Visit''fa fa-user'function ($row) {
            return 'controller#add' . $row->_id;
        }, true);

 

That allows the "Add a Visit" option for the row but if selected flashes a blank screen and returns to the original grid without prompting the user for data changes, etc.
 

Hoping this is simple and I'm just overlooking something obvious.

 

Thanks in advance.

 


rkrajnik
  • profile picture
  • Member

Posted 03 July 2020 - 12:29 PM

setClone() does enough of the work, issue closed.