Scenario
Unlike Custom HTML Template which provides more control to the User in terms of customizing layout, design or style the Default Form Template allow Users to create a simple Online Form with limited customization.
Some Users would like to customize the alignment of the label and text fields but there is no option to do so in the online form. To be able to customize the layout and text alignment, the user can use CSS Styles.
Solution
The text label in the Online Form Default template is align to “Right”.Using CSS User can override the default behavior and set the alignment of Field Labels.
- Navigate to Setup > Marketing > Online Customer Forms
- Online Customer Form: Click Edit
- Click Detail Message
- Click Formatted Edit Mode
- Detail Message: Add <style>.smalltextnolink{TEXT-ALIGN: center;}</style>
Note: This code is to set the field label alignment to center. - Click Save