Search

Very quick question that I can't seem to find an answer to: what is the mark-up for creating two radio buttons in Symphony?

Usually groups of buttons are grouped with the name attribute but symphony uses this for events meaning a group of buttons can't share the same name.

Also, I get an xslt error when I try and use type="radio" but not sure why?

Any help much appreciated.

what is the mark-up for creating two radio buttons in Symphony?

You mean the markup for radio buttons in HTML? Symphony doesn't care what the HTML form element is, so long as it's named correctly. Think of a set of radio buttons as the same as a select box — one value from many — the two are interchangeable in your frontend markup, and you can store the value in Symphony however you like (a text input or a select box).

Your markup should look like:

<input type="radio" name="fields[your-field]" value="Option 1" />
<input type="radio" name="fields[your-field]" value="Option 2" />
<input type="radio" name="fields[your-field]" value="Option 3" />

Also, I get an xslt error when I try and use type="radio" but not sure why?

Doesn't sound right. What's your XSLT?

Thanks Nick,

Ah - I didn't realise how radio boxes worked with symphony events and was getting myself all tied up in knots worrying about the name attribute!

That said I'm sure I tried something similar and got an error which I now can't repeat.

Anyway - working perfectly now thanks to that wee example so thanks!

T

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details