Hi guys,
I have a situation I can't figure out how to do it. So I have a Dropdown which loads its elements from the database and a calc field which value changes based on third date field. They are working as expected , but I need to make some options from the dropdown disabled based on the calc element. In fact the Dropdown's options are Available Services and when the user selects a date from the date field the calc element makes its magic and returns the values of the Dropdown's options that are unavailable for the selected date and they has to be disabled. not removed.
So I have tried with Javascript to the calc element but I can't manipulate the Dropdown fieeld. I can "access " it and get his value, but nothing like updating the values or removing them. For example the code
var form = Fabrik.getBlock('form_2');
form.elements.get('queries___service').update('newvalue|-|anothervalue'); - does not work.
Can anyone help me with that.
I have a situation I can't figure out how to do it. So I have a Dropdown which loads its elements from the database and a calc field which value changes based on third date field. They are working as expected , but I need to make some options from the dropdown disabled based on the calc element. In fact the Dropdown's options are Available Services and when the user selects a date from the date field the calc element makes its magic and returns the values of the Dropdown's options that are unavailable for the selected date and they has to be disabled. not removed.
So I have tried with Javascript to the calc element but I can't manipulate the Dropdown fieeld. I can "access " it and get his value, but nothing like updating the values or removing them. For example the code
var form = Fabrik.getBlock('form_2');
form.elements.get('queries___service').update('newvalue|-|anothervalue'); - does not work.
Can anyone help me with that.