I'm creating a simple form but it has posed me two small problems.
I have two questions.
a. I would love to load two or three fields in a search done by the autocomplete, i currently have the autocomplete working, but i can't seem to be able to load the other values into the corresponding textboxes. So, is there any tutorial to help me out?
b. The form has 4 boxes to upload files. I want to create a folder each time the form is submitted and inside the folder to put every linked file. So far, in every tutorial I've seen i can only specify one general folder, that can't be changed every time. How could i do this.
Thanks
I have two questions.
a. I would love to load two or three fields in a search done by the autocomplete, i currently have the autocomplete working, but i can't seem to be able to load the other values into the corresponding textboxes. So, is there any tutorial to help me out?
b. The form has 4 boxes to upload files. I want to create a folder each time the form is submitted and inside the folder to put every linked file. So far, in every tutorial I've seen i can only specify one general folder, that can't be changed every time. How could i do this.
Thanks
Hi oneira,
a. I think that this can be done, there may be an example in the forums from a year or two ago, it will require custom PHP to return several values, and custom JavaScript to populate several inputs when one of the results is selected.
b. Please see this FAQ. You can modify this to use some other unique submission identifier.
Bob
a. I think that this can be done, there may be an example in the forums from a year or two ago, it will require custom PHP to return several values, and custom JavaScript to populate several inputs when one of the results is selected.
b. Please see this FAQ. You can modify this to use some other unique submission identifier.
Bob
Hello and thanks. Very helpful as usual. However, i haven't been able to find the post you're referring to. Is it possible that it might have been erased? (regarding to a). As for b, thanks to your kind suggestion, i was pretty much able to adapted to my needs.
Hi oniera,
No, I can't see it either, it may have been a piece of client work.
I took a look at the code and I think that want I would do is to adapt the current AutoCompleter code so that the On Complete function (around line 54 of /administrator/components/com_chronoforms/form_actions/autocomplete_loader/cfaction_autocomplete_loader.php )
The extra function would execute a second Ajax request to get the extra values you want and then to load them into the inputs.
Bob
No, I can't see it either, it may have been a piece of client work.
I took a look at the code and I think that want I would do is to adapt the current AutoCompleter code so that the On Complete function (around line 54 of /administrator/components/com_chronoforms/form_actions/autocomplete_loader/cfaction_autocomplete_loader.php )
onComplete: function() {
$('<?php echo $params->get('field_id', ''); ?>').setStyle('background','');
}
is modified to run an extra function.
The extra function would execute a second Ajax request to get the extra values you want and then to load them into the inputs.
Bob
ok, i've been reviewing the code in the file you mentioned, However, one question arises (since i'm not that good at the whole MooTools thing): how could i pass the name of the other fields i would like to include in the search/return values? It is not clear in the code, so i haven't been able to create the second Ajax request. Sorry
I'm including the link to the form
http://cfobb.ca/index.php?option=com_chronoforms&chronoform=nomination_form
and as you can see, the first two fields in the first tab are working autocompletes, but i would love to have them linked so when the user chooses in any of the two, the other automatically gets filled. That selection would also trigger another sql query (that i already have, nothing fancy) that would fill the School Name drop-down menu. I know i'm repeating a lot of what i said in my first post, but i thought it would probably help. Thanks again.
http://cfobb.ca/index.php?option=com_chronoforms&chronoform=nomination_form
and as you can see, the first two fields in the first tab are working autocompletes, but i would love to have them linked so when the user chooses in any of the two, the other automatically gets filled. That selection would also trigger another sql query (that i already have, nothing fancy) that would fill the School Name drop-down menu. I know i'm repeating a lot of what i said in my first post, but i thought it would probably help. Thanks again.
This topic is locked and no more replies can be posted.