CalcBuilder Forum

Add inside radiobutton label

Usuario moon_1868 2014-12-02 10:07:17

Hi,

Sorry, the title would be "Add span inside radiobutton label", but the tag has been stripped and it seems I can't change the title.

I would like to dynamically change the label of a Radiobutton according to the selection (javascropt/jquery), so to see an intermediate result before submitting the form.
Unfortunately the generated html has the following structure:
label - input - Text to be changed - /label

Could you tell me what to change in the code so to obtain the following:
label - input - span - Text to be changed - /span - /label

In this way I could point to the correct tag inside label via jquery.

Thanks in advance

Elena

Edited by moon_1868 - 02.12.2014 10:08

Edited by moon_1868 - 02.12.2014 10:09

Edited by moon_1868 - 02.12.2014 10:10

Moonsoft support 2014-12-02 21:31:43

Hi,
yes, the forum has some code restrictions, the helpdesk allows to share code more easily. If you need to change dinamically contents of the html, we can suggest to use your own html inside the form. Use the form layout to include your radiobuttons with the html needed inside your labels, instead of using the predefined field types of the calcbuilder. Then you can recover your values at the calculator code using

$yourfield=JRequest::getVar('name');


Where 'name' is the html name you set for your radio input.


Hope this helps, regards

...
Support/development 10 hours

Get a bigger amount of hours for more complex tasks and get a 10% discount

Buy now!
...
Support/development

Perfect for small code changes or to correct any bug at your site

Buy now!