ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

Radio button loaded via Ajax function

fyanko 24 Jun, 2016
I'm using the code from https://www.chronoengine.com/faqs/70-cfv5/5232-how-do-i-build-a-dynamic-drop-down-in-cfv5.html tutorial and am unable to dynamically load radio boxes.

Create an Event and sending

<?php
$json= array()
$json[] = array('id' => 'phonenumber', 'text' => '1 123 456-7890');
$json[] = array('id' => 'phonenumber', 'text' => '1 123 456-7891');
echo json_encode($json);
?>

Please advise... Thanks!
GreyHead 25 Jun, 2016
Hi fyanko,

I think that's probably because the built-in code is written to add option sets to a drop-down select element and not to a radio button group.

You would need to write custom JavaScript to change the radio button group elements.

Do you need radio buttons? It would be simpler to use the built-in code with a select drop-down.

Bob
fyanko 26 Jun, 2016
Hi Bob,

I do need a radio button group... can we still use the chronoforms ajax functionality and just add to the framework or would this need to be completely coded outside of chronoforms in a separate javascript? Please provide code recommendations/samples if possible? Thanks!
This topic is locked and no more replies can be posted.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com