I used the code for country from the example to create a new text field called Wings. I've not found documentation that explains where the field selector value or the AJAX form event is taken from for the country example? The code does not work.
<?php
$wings = array(“1st Fighter Wing”, “1st Special Operations Wing”,
“2d Bomb Wing”, “3d Wing”, “4th Fighter Wing”, “5th Bomb Wing”,
“6th Air Mobility Wing”, “7th Bomb Wing”, “8th Fighter Wing”);
foreach($wings as $wing){
if(!empty($form->data['tag']) AND stripos($wing, $form->data['tag']) === false){
continue;
}
$json[] = array('id' => $wing, 'text' => $wing);
}
echo json_encode($json);
Hi fiatlux,
The field selector can be this:
And the AJAX form even is the name of the event which holds the custom code action in the form, its the last one under "Setup", its called "countries_list" at the demo form.
I think using the code you have without any other changes to the form setup should get it to work.
Best regards,
Max
The field selector can be this:
#FIELD_ID_HERE
And the AJAX form even is the name of the event which holds the custom code action in the form, its the last one under "Setup", its called "countries_list" at the demo form.
I think using the code you have without any other changes to the form setup should get it to work.
Best regards,
Max
This topic is locked and no more replies can be posted.