Saturday, June 16, 2012

Append "*" before Required fields label in Sobipro

I want to add * before require field label. there are not any setting option in the sobipro configuration. and sobipro is used .XSL format to display fields to the front end. and if i add * in the XSL file then star will display above all the fields.

Open your sobipro section and then open edit.js file from the js directory in template files template files. and write below code in the top of the file.

jQuery(document).ready(function() {
    jQuery('.required').parent().parent().find('.spFormRowLeft label').before("<label>*</label>");

after writing above code  just reload the from page. it will looks like below image.