I have a page that's not returning all the form vars. Specifically, I'm not getting the value of a radio button in the form vars. I use Request.aFormVars(@FormVarsArray) and the values for some radio buttons in use are not in that array. I know checkboxes with values of false don't come across on the submit, but radio button values should, right? And the value from other radio buttons are, but not all of the ones in use on the form. Any ideas on what could cause this?
Are disabled controls not submitted? It appears that's what's happening here. The radio button in question controls the enabled/disabled status of other controls and not only is the radio button value not submitted when the other controls are disabled, but the values for those controls are not submitted, either.
I have a page that's not returning all the form vars. Specifically, I'm not getting the value of a radio button in the form vars. I use Request.aFormVars(@FormVarsArray) and the values for some radio buttons in use are not in that array. I know checkboxes with values of false don't come across on the submit, but radio button values should, right? And the value from other radio buttons are, but not all of the ones in use on the form. Any ideas on what could cause this?
I can't recall if Disabled controls don't return values but I know ReadOnly fields are definitely not. It's a browser issue - they simply don't set those values.
But - if those values are not enabled why would you care whether they come back or not? If you're binding to your model you should always ensure you first load the model with values from the DB (or whereever) then unbind into that. So if a value is not set you get the original value that was on the model.
Unchecked radio buttons also are not forwarded just like checkboxes. Basically all toggle controls only send a value if they're toggled.
+++ Rick ---
I have a page that's not returning all the form vars. Specifically, I'm not getting the value of a radio button in the form vars. I use Request.aFormVars(@FormVarsArray) and the values for some radio buttons in use are not in that array. I know checkboxes with values of false don't come across on the submit, but radio button values should, right? And the value from other radio buttons are, but not all of the ones in use on the form. Any ideas on what could cause this?
West Wind Technologies
Making waves on the Web
from Maui
I can't recall if Disabled controls don't return values but I know ReadOnly fields are definitely not. It's a browser issue - they simply don't set those values.
But - if those values are not enabled why would you care whether they come back or not? If you're binding to your model you should always ensure you first load the model with values from the DB (or whereever) then unbind into that. So if a value is not set you get the original value that was on the model.
Unchecked radio buttons also are not forwarded just like checkboxes. Basically all toggle controls only send a value if they're toggled.
+++ Rick ---
I have a page that's not returning all the form vars. Specifically, I'm not getting the value of a radio button in the form vars. I use Request.aFormVars(@FormVarsArray) and the values for some radio buttons in use are not in that array. I know checkboxes with values of false don't come across on the submit, but radio button values should, right? And the value from other radio buttons are, but not all of the ones in use on the form. Any ideas on what could cause this?