Editor: Is there a way to send additional data when creating a record?
Editor: Is there a way to send additional data when creating a record?
I have a very simple table for company addresses (id, company_id, address). The DataTable shows "Company Name, Address". When I create a new record, I need include the company_id so that the address is added to the correct company.
Is there an easy way to append this to the form data that is submitted for a Create action?
Alternatively, I thought about to a doing something with postCreate() to update the newly created record, but this seems overly complicated.
Any ideas/assistance is greatly appreciated.
Thank you!
This question has an accepted answers - jump to answer
Answers
Absolutely, you can either use a
hidden
field type, or useajax.data
to add additional data to that which Editor sends.Regards,
Allan
Excellent! I remembered it having something like ajax.data from a couple months ago, but I couldn't find it this morning. I really like the hidden field type.
Thanks again for a great tool!