woodhacker98 Posted August 4, 2006 Share Posted August 4, 2006 Hi!I have a form with a lof of hidden fields (basically a search form that will pass some variables to a non editable php CMS system to search in different categories - and I MUST pass exactly the right variables to the php script ). I apply values with DOM in the different hidden fields based on which radiobutton the user has selected. If he selects "web" radiobutton, I apply values to a number of fields with a function when the user has pushed the submit button. The rest of the hidden fields doesn't get any values, and shows in the adressfield in the browser like this: ....&variable1=&variable_not_used=& and so on... The script is running perfect.. But now I have a little problem.. I have to extend the script with a new radiobutton to search in a new category. And when I search in a new category, the phpcms system doesn like one of the other variables i send in GET, even if it is blank/unset.. Yes the system suck.. But I cant do anything about it..Therefore this question:Is it possible to "hide" a hidden element in a form, and do it "visible" when I need it? So it doesnt beeing sent with the GET action? I have tried with:[code]<div id="hide_me" style="visibility:hidden"><input type="hidden" name="news" value=""></div>[/code]But this only works with visible objects in html.. The variable is sent by GET anyway..Do you guys have a hint for me?RegardsTore Quote Link to comment Share on other sites More sharing options...
myophp Posted August 14, 2006 Share Posted August 14, 2006 to prevent it from being sent, try disabling the hidden field. ie: [code]<input type='hidden' DISABLED value='not used' name='unused' /> [/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.