Hello,
I have a form which, upon submission, loads another form via AJAX request.
When I click the submit button on the next form, it does not use AJAX to load the request. Furthermore, it appends &tvout=ajax to the URL which causes the next page to load with zero Joomla resources.
Can you please help me with this problem? (The reason I am not using multipage for this is because of conflicting form names for the DB Save)
Thank you
I have a form which, upon submission, loads another form via AJAX request.
When I click the submit button on the next form, it does not use AJAX to load the request. Furthermore, it appends &tvout=ajax to the URL which causes the next page to load with zero Joomla resources.
Can you please help me with this problem? (The reason I am not using multipage for this is because of conflicting form names for the DB Save)
Thank you
Hi ckanonymous,
Sorry, I don't even begin to understand what you are trying to do here.
The $tvout=ajax is used by ChronoForms Ajax requests exactly to allow sending data back without the template, etc. You could presumably write a custom Ajax function to do something different.
But . . . it might be simpler to use Model IDs aka sub-arrays to separate out the data you need to save to the different tables, that will work OK.
Bob
Sorry, I don't even begin to understand what you are trying to do here.
The $tvout=ajax is used by ChronoForms Ajax requests exactly to allow sending data back without the template, etc. You could presumably write a custom Ajax function to do something different.
But . . . it might be simpler to use Model IDs aka sub-arrays to separate out the data you need to save to the different tables, that will work OK.
Bob
Thank you for your response.
I want a form that loads specific form elements, based on the first radio box selection you make. Each radio selection loads a different set of subsequent form elements. However, these form elements share identical IDs across the different sets of elements. When I submit, elements with the same ID will just choose the last one to put into the form data array.
Is it acceptable to have form elements have the same element ID? If so, how do I collect all of the data and choose the specific one for a DB Save?
To my understanding, Model IDs are for multiple tables with same column names, not same element IDs.
I want a form that loads specific form elements, based on the first radio box selection you make. Each radio selection loads a different set of subsequent form elements. However, these form elements share identical IDs across the different sets of elements. When I submit, elements with the same ID will just choose the last one to put into the form data array.
Is it acceptable to have form elements have the same element ID? If so, how do I collect all of the data and choose the specific one for a DB Save?
To my understanding, Model IDs are for multiple tables with same column names, not same element IDs.
Hi ckanonymous,
There's an important difference between element names and element ids.
The ids should be unique in the page - you may get problems (especially with JavaScript) if you have more than one element with the same id.
The names can be repeated, and - as you say - the submitted value will be from the last enabled element in the page with that name.
Model IDs are only used by ChronoForms and they mark out sub-arrays in the $form->data[''] array that can be used to group data, very often for saving to (or loading from) different tables.
Bob
There's an important difference between element names and element ids.
The ids should be unique in the page - you may get problems (especially with JavaScript) if you have more than one element with the same id.
The names can be repeated, and - as you say - the submitted value will be from the last enabled element in the page with that name.
Model IDs are only used by ChronoForms and they mark out sub-arrays in the $form->data[''] array that can be used to group data, very often for saving to (or loading from) different tables.
Bob
This topic is locked and no more replies can be posted.
