Dropdown to update another dropdown and not update database
Dropdown to update another dropdown and not update database
![nicontrols](https://secure.gravatar.com/avatar/5f176d4555f0f9bc7e4c4a0d362e19a6/?default=https%3A%2F%2Fvanillicon.com%2F5f176d4555f0f9bc7e4c4a0d362e19a6_200.png&rating=g&size=120)
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