possible to use unbound values in editor ?
possible to use unbound values in editor ?
i have a basic product table using ajax/json source, which on postCreate() adds rows to other tables in the database.
I would like to add the option so that the postCreate() function checks the value of a checkbox on the editor modal so the user can control this event, but the checkbox itself is not represented anywhere other than in the form, I just want it to appear and be able to check its post value
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Include the checkbox in the form like you would do any other checkbox field (just don't define a
Field
in the PHP code!) then it will be available in the$values
parameter that is passed into the PHPpostCreate
event.Regards,
Allan
sorry, don't quite get it.
does this checkbox lie outside of the fields: [ ] array ?
is there an example ?
There isn't an example of this I'm afraid.
Add:
to your Javascript for Editor.
Then in
postCreate
use:$values['unbound']
to get the value of the checkbox.Allan
thats great.
in an effort to avoid adding the field value to the name, I was leaving out this parameter entirely, giving me an error.
works a treat ! Thanks