Re: Quick way to wrap input[type=radio] in label tags?

2013-06-18 Thread Simon Males
I don't believe there is, I did it the 'long' way. On Tue, Jun 18, 2013 at 12:25 PM, OJ Tibi - @ojtibi ojt...@gmail.comwrote: Good day, folks! I was wondering if there was any quick option of making label tags wrap the inputs they're associated with, instead of sitting beside the input

Re: Quick way to wrap input[type=radio] in label tags?

2013-06-18 Thread 清水紘己
I think very quick and dirty way is to override radio() method of FormHelper. http://book.cakephp.org/2.0/en/views/helpers.html#using-and-configuring-helpers Follow above, create MyFormHelper(or your preferring name), override radio() method, and do preg_replace() to the result of parent method.

Re: Quick way to wrap input[type=radio] in label tags?

2013-06-18 Thread LDSign
Hi Have a look at the form helper options ( http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html). Using format, after,before and between even complex wrapping is possible. Ive used this in combination of an extended FormHelper to make the markup for bootstrap (including errors,

Re: Quick way to wrap input[type=radio] in label tags?

2013-06-18 Thread OJ Tibi - @ojtibi
Thanks, I probably have to subclass the FormHelper, as hiromi pointed out in an earlier reply, since the label's for attribute is kinda required, and the radio button IDs need to be generated in a loop. At first I tried creating a custom configuration of $tags that the HtmlHelper would be

Quick way to wrap input[type=radio] in label tags?

2013-06-17 Thread OJ Tibi - @ojtibi
Good day, folks! I was wondering if there was any quick option of making label tags wrap the inputs they're associated with, instead of sitting beside the input itself (e.g., labels for radio buttons generated by FormHelper-input() or FormHelper-radio() don't actually wrap the radio buttons