I have a scenario where based on criteria A I default a form element and then if it meets criteria B I disable the element to restrict the user from changing the value. But when it is disabled the default value does not pass to case2.asp. Rather Request.Form("x_my_var").Item returns 'undefined'. Any way to get the value of the disabled form field?
Disabled form elements do not get posted. This is standard web behavior, not specific to Dovetail.
You can make the element readonly. Or hidden.
I know it is standard web behavior, I was just hoping one of the html gurus on this forum may know a good way around it since Dovetail uses so many disabled attributes int he code! For the time being I am just doing a document.getElementById('x_my_var).disabled = false; before I submit the form so they post. It seems to work OK thus far. I can't hide them since they must be visible and most of them are <select> elements using GetHgbstList() so I can't make them RO since I believe RO only works for input and textarea.
Thanks Gary!
Better late than never I guess...
I posted a few javascript routines on the site the other day. There are a couple that specfically deal with enabling/disabling form fields.
http://blogs.dovetailsoftware.com/forums/thread/11260.aspx