Jump to content

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/264930-form-and-hidden-div/
Share on other sites

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

 

Link to comment
https://forums.phpfreaks.com/topic/264930-form-and-hidden-div/#findComment-1357678
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.