vishalonne
03-11-2010, 05:35 AM
Hi
This is my first query in this forum. My problem is simple, I just require 1 text box to be enable/disable depending on the option selected from drop down box by user.
Visit the my site (http://www.oemxtrade.com/index.php?main_page=create_account)
Here Company Certification: which has to be selected, if Other option is selected then Text box named Other will enable, and for the ISO2001 and None text box will disable.
Here is the code which I embedded in Zen cart's php file
<label class="inputLabel" for="company_certification"><?php echo 'Company Certification:'; ?></label>
<?php
echo "<select name=\"company_certification\">";
echo "<option value=\"ISO2001\">ISO2001</option>";
echo "<option value=\"OTHER\">Other</option>";
echo "<option value=\"None\">None</option>";
echo "</select>";
?>
<?php echo "Other:"; ?>
<?php echo zen_draw_input_field('other_certification', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'customer_company_other_certification', '40') . ' id="other_certification"') . (zen_not_null(ENTRY_COMPANY_TEXT) ? '<span class="alert">' . ENTRY_COMPANY_TEXT . '</span>': ''); ?>
I will thankful to you all for any suggestion or guidance
Regards
This is my first query in this forum. My problem is simple, I just require 1 text box to be enable/disable depending on the option selected from drop down box by user.
Visit the my site (http://www.oemxtrade.com/index.php?main_page=create_account)
Here Company Certification: which has to be selected, if Other option is selected then Text box named Other will enable, and for the ISO2001 and None text box will disable.
Here is the code which I embedded in Zen cart's php file
<label class="inputLabel" for="company_certification"><?php echo 'Company Certification:'; ?></label>
<?php
echo "<select name=\"company_certification\">";
echo "<option value=\"ISO2001\">ISO2001</option>";
echo "<option value=\"OTHER\">Other</option>";
echo "<option value=\"None\">None</option>";
echo "</select>";
?>
<?php echo "Other:"; ?>
<?php echo zen_draw_input_field('other_certification', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'customer_company_other_certification', '40') . ' id="other_certification"') . (zen_not_null(ENTRY_COMPANY_TEXT) ? '<span class="alert">' . ENTRY_COMPANY_TEXT . '</span>': ''); ?>
I will thankful to you all for any suggestion or guidance
Regards