How do I get the field default value to disappear when the field is clicked?
Appnitro Software Forums » MachForm 2
Auto Clear Field
Started 3 years ago by Jerry82 | 2 posts |
-
Posted 3 years ago #
-
You need to edit "view-functions.php" file to do that. If you have text field with element id = 1 in form 1, then try to follow these steps :
1. Go to around line 39 and you'll see this code :
$element_markup = <<<EOTput these code above that line
if ($_GET['id'] == 1 && $element->id == '1') { $reset_data = "onClick=\"javascript:this.value='';\""; }2. Go to around line 48, you'll see this code :
<input id="element_{$element->id}" name="element_{$element->id}" class="element text {$element->size}" type="text" value="{$element->default_value}" />replace with this one
<input id="element_{$element->id}" name="element_{$element->id}" {$reset_data} class="element text {$element->size}" type="text" value="{$element->default_value}" />MachForm Support
Posted 3 years ago #
Reply
You must log in to post.
