Add new parent in select field
Hi,
I have a one to many relationship, in the child create form I have a select field. Is it possible to create a new parent if it does not exist without changing view? Or would I need to create a custom field?
6 Replies
I think it's
->createOptionForm()
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Thanks I will have a look
Thanks I didn't see this in the docs (didn't scroll down enough).
Second question. How do I add a value to a hidden field? I need to add the currently logged in users id to be entered into the dB.
you can use ->default
but i think it' better to handle it in the backend, otherwise anyone can inspect the html and change the vlaue
Don't use a hidden field. They are insecure. Use a lifecycle callback
Ah ok.
Thank you I have it working really nicely now.