Enter text above a form field

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
cdmak
User
Posts: 27

Enter text above a form field

Post 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>


digitalphotoworld
User
Posts: 416
Location: Nürnberg/Germany

Post 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.


innovativeshadow
User
Posts: 86
Location: Almaty, Kazakhstan

Post 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>";


philmills
User
Posts: 535

Post by philmills »

How can I get the text to appear above a checkbox?
with the code given here, the text is below the checkbox


mobhar
User
Posts: 11660

Post 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.


beatrizuntres
User
Posts: 1

Post 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?


Post Reply