Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to make customizable form using php jquery?
    primarykey
    data
    text
    <p>I'm implementing a registration form with 10-15 fields. I need to develop it in such a form like admin has rights to enable or disable fields which he wants to show user. In short form, If admin wants user to enable only 7 fields among 10., admin needs to check the fields and on clicking save settings, he want to show that customized form to user for registration. I`m currently using table format inside a form, so if user wants to remove a field, he can check the table row, so it will be disbaled.</p> <p>here is the sample code</p> <pre><code>&lt;table width="400" style="width:500px" border="1" align="center" id="reg_form" class="tables_section" &gt; &lt;tr&gt; &lt;td width="221"&gt;&lt;strong&gt;Full Name&lt;/strong&gt;&lt;/td&gt; &lt;td width="163"&gt;&lt;span id="sprytextfield1"&gt;&lt;input type="checkbox" name="c1" value="" checked /&gt;&lt;input type="text" name="fname" class="alphaonly" id="fname" maxlength="20" /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;strong&gt;Username&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;&lt;span id="sprytextfield4"&gt; &lt;label for="username"&gt;&lt;/label&gt; &lt;input type="checkbox" value="" checked /&gt; &lt;input type="text" name="username" class="alphaonly" id="user_id" class="user_name" ="*" maxlength="20" /&gt;&lt;br/&gt; &lt;span class="check"&gt;&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;strong&gt;Email&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;&lt;span id="sprytextfield4"&gt; &lt;label for="email"&gt;&lt;/label&gt; &lt;input type="checkbox" checked id="emailcheck" /&gt;&lt;input type="email" name="email" id="email" maxlength="40" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;strong&gt;Birthday&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;&lt;input type="checkbox" value="" checked /&gt;&lt;input type="text" name="birthday" id="birthday" readonly /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;strong&gt;Date of Join&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;&lt;input type="checkbox" value="" checked /&gt;&lt;input type="text" name="doj" id="doj" readonly /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;script&gt; $('#savesettings').click(function(){ if ($('table tr td checkbox').attr("checked")) { $('table tr').show(); } else { $('table tr').hide(); } /*});.on("click", function() {*/ }); $('#editsettings').on("click", function(){ $('table tr').show(); }); &lt;/script&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload