Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Biz form watermark in jquery mobile version View modes: 
User avatar
Member
Member
rafik - 3/19/2013 11:08:36 AM
   
Biz form watermark in jquery mobile version
Hi everyone,

I looked at the jquery that was add in mobile version of ecommerce demo site 7.0.
In the contact section there is 2 fields with watermark (email and comment).
but when I checked the jquery add it to show the watermark for those 2 fields, I found it was done by field type and not by column name.

here is what it show:
  form(".FormPanel input[type=text]", "Your e-mail");
form(".FormPanel textarea", "Your message");

If you have more fields and let's say some are have another text input, it will show "Your e-mail". Now my question is how you can specify it's for let's say a specific column name (name, address, etc...)

My best regards

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 4/3/2013 9:11:26 AM
   
RE:Biz form watermark in jquery mobile version
Hello Rafik,

The reason is that you need to add a specific class to your field(s), because the default
.FormPanel input[type=text]
is very general, so it's adding a text "Your e-mail" into all text input fields.

To add another field with a custom text you will need to add a CSS class to your field via CMS Desk -> Tools -> (Biz)Forms -> Edit your form (General question) -> Fields tab -> then click on the button "Switch to advanced mode" -> CSS Styles -> Control CSS class -> Add your class "name" e.g. (myClass)

Then in the script you can simply add this field with custom class in the following way:
form(".FormPanel input[type=text]", "Your e-mail");
form(".FormPanel textarea", "Your message");
form(".FormPanel input.myClass[type=text]", "My custom text");

Best regards,
Martin Danko