• Hi,

    I’d like to use line breaks on the options for a mutliselect checkbox, so that when more than one is selected they appear on separate lines. If I put the </br> at the start of the option the checkbox is on a new line, and if I put </br> at the end of the option, the comma appears on a new line.

    Is there a way of doing this?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Roland Barker

    (@xnau)

    The best way to do this is with CSS. Adding linebreak HTML tags won’t always work as expected.

    To do this with CSS, you set the display property of the elements to “block” which will force the elements to display each on their own line.

    Thread Starter lcp298

    (@lcp298)

    I must be missing something. If I use the dd element of the field it doesn’t affect the individual options, if I use the a tags (all the options have hyperlinks), each option is on a new line but so are the commas. There are no other elements to use.

    Thanks

    Plugin Author Roland Barker

    (@xnau)

    Oh, so we’re talking about displaying the selected values of the field, not the checkboxes? I didn’t get that, I’m sorry.

    You won’t be able to get rid of the commas unless you write some custom code to modify the HTML the field produces.

    The filter to use for that is pdb-before_display_form_element

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Line breaks on multiselect checkboxes’ is closed to new replies.