delickate Posted June 28, 2012 Share Posted June 28, 2012 Hi, I've have a form with some hidden DIVs. all DIVs has some feilds..... i want that only display: block div should be a part of my form. hidden div content should not me a part of my form. but when i submit a form and get values it gives all values. even container is hidden or block. would any one help me on this??? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/264930-form-and-hidden-div/ Share on other sites More sharing options...
cyberRobot Posted June 28, 2012 Share Posted June 28, 2012 What are you trying to do? A code sample might be helpful. Could you just ignore form fields which haven't been filled out? Quote Link to comment https://forums.phpfreaks.com/topic/264930-form-and-hidden-div/#findComment-1357672 Share on other sites More sharing options...
delickate Posted June 28, 2012 Author Share Posted June 28, 2012 Hi, I've dynamic form. all div and fields are dynamic. so hard to ignore them. sample code is as follow <form> <select name="txtbrandCategory'.$i.'[]" id="txtbrandCategory'.$i.'" class="branddropdowncss required" onchange="showfeildsperbrndCat(this, \''.$i.'\')" id="brandcatslctbox"> <option value=""> -- select -- </option> ----------------------- ------------------------ ---------------------------- </select> <?php for(i=1; i<=10; i++) { ?> <div id="divid23<?php echo $i; ?>" style="display:none"><input type="text" name=txtname[] /></div> <div id="divid42<?php echo $i; ?>" style="display:none"><input type="text" name=txtphone[] /></div> <div id="divid39<?php echo $i; ?>" style="display:none"><input type="text" name=txtemail[] /></div> <?php } ?> </form> on select box change one of the div will show up. but when i submit a form if return all dives data. so i want to get only that div data which is display block. hope you understand now. thanks Quote Link to comment https://forums.phpfreaks.com/topic/264930-form-and-hidden-div/#findComment-1357678 Share on other sites More sharing options...
memfiss Posted June 28, 2012 Share Posted June 28, 2012 why u cant ignore them ? its best idea Quote Link to comment https://forums.phpfreaks.com/topic/264930-form-and-hidden-div/#findComment-1357686 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.