Page 1 of 1
Enter text above a form field
Posted: Fri Jan 12, 2018 4:14 pm
by cdmak
Hello,
I'm working towards putting some instructions above some of the fields in the form that will always be visible, is there anyway to do this? Thank You
<span id="el_customers_LAST_NAME">
Here is where the custom text needs to go above the field.
<input data-table="customers" data-field="x_LAST_NAME" data-page="1" name="x_LAST_NAME" id="x_LAST_NAME" size="30" maxlength="150" placeholder="Last Name" value="Smith" class="form-control" type="text">
</span>
Re: Enter text above a form field
Posted: Mon Jan 15, 2018 6:40 pm
by digitalphotoworld
Just use the Page Render event of the site (add/edit) and use
$this->FIELDNAME->CustomMsg .= "<span class='help-block'>This is my additional text</span>";
The code use the bootstrap class help-block. Just replace the FIELDNAME to your needs. It works great with the code that is created by default and you don't have to create your own templates.
Re: Enter text above a form field
Posted: Thu Jan 17, 2019 9:27 pm
by innovativeshadow
You can also add a link to your page here, just for a little more help on this, who is searching for it like me.
$this->Client->CustomMsg .= "<span class='help-block'>Your message here, <a href='yourpage.php' target='_blank'>Click here</a></span>";
Re: Enter text above a form field
Posted: Tue Feb 11, 2020 3:08 pm
by philmills
How can I get the text to appear above a checkbox?
with the code given here, the text is below the checkbox
Re: Enter text above a form field
Posted: Fri Feb 14, 2020 9:30 am
by mobhar
You may use jQuery prepend in order to insert your text at the beginning of each element in the set of matched elements. Just Google "jquery prepend" for more info and examples.
Re: Enter text above a form field
Posted: Mon Jun 14, 2021 11:17 pm
by beatrizuntres
I do not understand much code but I want to create capos to complete a form on my website. Can someone help me?