I have a form which contains a choicefield called level allowing the selection of value between 0-3 who’s options I want to “limit” dynamically. Is this possible?
pseudo-code for the view would contain something like this:
form = new instance of myform
allowed_level = 2
form.level maximum value =< allowed_level
Sure, you can dynamically set the validation criteria when creating the form: (beware: this isn’t a complete example as I’m not sure of your setup)
and just use your view normally