Dropdown to update another dropdown and not update database
Dropdown to update another dropdown and not update database
nicontrols
Posts: 32Questions: 16Answers: 1
Is it possible to have a dropdown that updates the contents of another dropdown without committing any changes to the database?
The contents of the 2nd dropdown need to be grabbed from the database.
I can sort of get editor.dependant() working but the first dropdown wants to update the database, which I don't want,
I hope that makes sense.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi @nicontrols ,
Would making it
readonly
work - that way Editor wouldn't expect to write it back?Cheers,
Colin
To get this to work, I just ended up removing the node from the JSON being submitted to the server.
In this example, I didn't want the salstkitem table to update, but I still wanted the dropdown functionality. It's a pretty weird situation that not many will encounter I imagine:
Yes! As of Editor 1.8.0 there is the
fields.submit
option which can be used to prevent the data being submitted to the server for a field.Allan