Anyone notice they are able to change read only select type fields in this specific version of forms?
You can clearly see it is read-only by the background color, but I can select any select type filed and pick a new value.
Anyone notice they are able to change read only select type fields in this specific version of forms?
You can clearly see it is read-only by the background color, but I can select any select type filed and pick a new value.
You're using the wrong attr for slect elements, you should actually be setting the disabled property.
$('.classname select').attr("disabled", true);
Well this worked! I have been using the readonly attribute for years on any type of field thinking it meant the user can only read the data, not write the data.
Thank you!
You're welcome! Glad I was able to help!
PS. The same type of deal applies to radio buttons, but you'll want to target the 'fieldset' element.
$('.classname fieldset').attr('disabled',true)
Oh I was using this method for radio
$('.conRead input:not(:checked)').attr('disabled', true);
That works too! Essentially the same thing, just wanted to be sure you knew to use the disabled attr. Cheers!
Can you do this on the actual form? It looks like you are on the CSS/JS page.
Yes, both in production within the user task and in preview. First I have ever run into this.
How did you set the field to read only? (Field level/section level/form level)
If you change the value to something else, can you submit the form? Does it pass backend validation? If you go to monitor, does the value actually get updated?
I am setting to read only using this line of script. Field rules do not yet support read/write in the modification options, I believe script is the only way to do it and I have been doing this for years without issue.
$('.className select').attr('readonly',true);
I just tested changing it from the task where it is read-only, and on the next task it is changed in the history and in the current forms variables.
Is this happening to your other forms where you used this? Or just this one form?
The readonly attribute should be supported by all browsers, but it could be a browser specific issue. Have you tried other browsers as well?
It works on all other forms running on any other version. I just tested on a brand new form under this version and same problem, also just tested using Edge instead of Chrome and it is the same.