GeckoSix
Forum Replies Created
-
Forum: Plugins
In reply to: [Visual Form Builder] Field title inside fieldGot it figured out. I updated form-output.php
In case this is useful to someone else who wants to set the field labels inside the fields:
1. Approx line 148:
<label for="<label for="' . $id_attr . '" class="vfb-desc">
‘. stripslashes( $field->field_name ) . $required_span . ‘</label></label>
a. Copy to clipboard the code in bold above between the <label for…></label>
because you will need it later.b.remove everything in bold above from the code. By doing so, the form will not output the field label on top of the field.
So you should end up with this:
<label for="<label for="' . $id_attr . '" class="vfb-desc"></label></label>
2. Go to about line 210 and enter the code, that you copied earlier, where indicated below:
$output .= '<input type="text" name="vfb-' . $field->field_id . '" id="' . $id_attr . '" value="
ENTER CODE HERE" class="vfb-text ' . $size . $required . $validation . $css . '" />';
Now you should end up with:
$output .= '<input type="text" name="vfb-' . $field->field_id . '" id="' . $id_attr . '" value="'. stripslashes( $field->field_name ) . $required_span . '" class="vfb-text ' . $size . $required . $validation . $css . '" />';
*** So far what we did was remove the piece of code that displayed the field label above the field and we took that piece of code and put it where the field’s ‘default value’ would appear, making the field label appear inside the field.
However, if you have any ‘required’ fields, then we have to modify another field so that your form shows NAME* and not NAME<span>*</span>
3. Go to line 80 and look for
$required_span = ( !empty( $field->field_required ) && $field->field_required === 'yes' ) ? ' <span>*</span>' : '';
remove the <span></span> tags so that you end up with
$required_span = ( !empty( $field->field_required ) && $field->field_required === 'yes' ) ? '*' : '';
And youre done.
I hope this is helpful
Forum: Plugins
In reply to: [Visual Form Builder] Field title inside fieldThanks Matthew,
For now, I’d like to keep my Field labels populated in the admin side but I’d like to hide the field labels on the front side (what the visitor sees). Which file and line would I have to modify to do this. I looked and couldnt see where.Could you point me in the right direction?
Thanks