I have my form with several single line tex, but i need to Know How can i do to create a password form?
Appnitro Software Forums » MachForm 2
please, I need this...
Started 3 years ago by carlosblancomendoza | 3 posts |
-
Posted 3 years ago #
-
Do you want to create "single line text" with password type ? if it's so, you need to edit "includes/view-functions.php" go to around line 40~47, you will see this code :
$element_markup = <<<EOT <li id="li_{$element->id}" {$error_class}> <label class="description" for="element_{$element->id}">{$element->title} {$span_required}</label> <div> <input id="element_{$element->id}" name="element_{$element->id}" class="element text {$element->size}" type="text" value="{$element->default_value}" /> </div>{$guidelines} {$error_message} </li> EOT;replace with this
if ($_GET['id'] == '31' && $element->id == '1') { $set_type = 'type="password"'; } else { $set_type = 'type="text"'; } $element_markup = <<<EOT <li id="li_{$element->id}" {$error_class}> <label class="description" for="element_{$element->id}">{$element->title} {$span_required}</label> <div> <input id="element_{$element->id}" name="element_{$element->id}" class="element text {$element->size}" {$set_type} value="{$element->default_value}" /> </div>{$guidelines} {$error_message} </li> EOT;I assume you want to change text box with element id = 1 in form id 31 to be password type. make sure you adjust those ID with yours
MachForm Support
Posted 3 years ago # -
Excellent. Your technical advice was correct at 100%.
Posted 3 years ago #
Reply
You must log in to post.
