Formatting the display of Radio Buttons - Displaying Radio Buttons horizontally instead of vertically
Original Post by Sean Docherty (Imported from Ardevia Forum)
Hello,
I have a required field in a form called Currency. This field is a Choice field in the SharePoint list that I have created.
It was originally a Drop Down option, but it now needs to be changed to Radio Button option in the Choice field settings.
Is there a way to display the Radio Button horizontally instead of vertically?
Thank you
-
Original Post by Sean Docherty (Imported from Ardevia Forum)
As a note, I have found the user @Sandy who has posted the same question about the display of Radio Buttons at this link - Displaying radio buttons horizontally - How do I change the buttons from displaying vertically to displaying horizontally
Vitaliy has posted the following code to make this happen:
var rows = jQuery('span[fieldname="FieldName"] table tr');
rows.css('display', 'inline-block');Upon further reading I have the same requirement as the user @Sandy to have spacing between the Radio Buttons. Vitaliy provided additional code and I have added it. My final version of the code is below:
var rows = jQuery('span[fieldname="[[Currency_x0020_Type]]"] table tr');
rows.css('display', 'inline-block', 'margin-right', '5px');The above code is in the Form Load Actions and the Type is set to "Execute Script"
When I save this action and the form the Radio Buttons still only display in a vertical format and not a horizontal format.Please advise on what I am doing wrong here.
Thanks
0 -
Original Post by iryna (Imported from Ardevia Forum)
Hi,
it looks like the mistake is in this part:
Code
span[fieldname="[[Currency_x0020_Type]]"]
It should be:
Code:
span[fieldname="Currency_x0020_Type"]
0
Please sign in to leave a comment.
Comments
2 comments