In this guide, we will explain how to update the label and input width for all fields using JavaScript.
Drag and drop some Fields with a JavaScript field as shown below.
Click the pencil icon of the JavaScript field and paste the code.
Please use this code:
// Define field types to update
var formyoula_field_types = '.formyoula-Text, .formyoula-TextArea, .formyoula-Date, .formyoula-Number, .formyoula-Select, .formyoula-MultiSelect';
// Update labels
$( formyoula_field_types )
.find( 'label' ).removeClass( 'col-sm-2' ).addClass( 'col-sm-6' );
// Update inputs
$( formyoula_field_types )
.find( 'div' ).removeClass( 'col-sm-10' ).addClass( 'col-sm-6' );
Click the Advanced option in the JavaScript field, and set “0” for “JavaScript Load Delay”. Then save the changes.
Try the form.
For any questions, please contact us - [email protected] or the Formyoula in-app chat 🙂