Dear Chronoteam,
i am using your free version of chronoforms V4 and i have to say this is far the best form-creator i have tryed out for joomla in all these years! Thanks for this great tool. I was already posting a review to Extension-Directory and i am even thinking of buying a Pro-Version eventually.
Anyway today i do have a big problem in setting up and using CF4 correctly (i guess).
Here is my issue:
I was setting up a multipage-form which is supposed to act as a survey, asking (registered) users about 10 questions, storing the records of the answers made into newly created a db-field which i linked to the form. Up to this point the survey itself works perfectly, if a user answeres all questions and submits, the data get stored in the db. So far so good.
Now i wanted to display ALL of these record entries, the "results of the survey(s)" to other (non-registered) users in a nicely formatted page-view.
So i created another (empty) 2. form with yet no fields(!), using the "DB Multi Record Loader" setting up the name of the db-field where the data of my first form gets stored in.
Inside the fields-column i was entering all the form-fieldnames i used in my first form as well as in the "Display-fields"-column of the "Data-Displayer"-Tab in comma-separated lists.
In the "On Records found" field i added a "Handly arrays" as well as a "Show Html"-event.
In the "On empty result" field is has just a custom code event, notifying me "Empty Table !!! No Data !!". After the "DB Multi Record Loader" i added a Stopper-Event to quit the form from running.
I was already also following the instructions of the "CFV4_db_multi_record_loader.pdf" of your tutorials, setting up another "CustomCode-Field" containing all the fields i was using in my first form, in the following syntax:
<?php
foreach($form->data['j25_choronoforms_data_mydata_basefield'];
?>
<tr>
<td>Name: <?php echo $detail['name']; ?></td>
... and so on ...
</tr>
<?php endforeach; ?>
</table>
So now my problem: everytime i am loading the 2. form that is supposed to show my data from db there is none! But the data IS stored in db...
I was already setting up a debugger, THERE it shows my data-records from db, but it isnt displayed inside my page(form) so:
What am i doing wrong???
Why isnt my data showing up?
How can i exactly set up Chormoforms to just display (non-edit) the record-entires of my first form inside a page?
I am really SORRY to bother with such easy stuff maybe, but i am busting my head off since hours with no result😫
Greatly apprechiate your quick help, thanks a lot in advance,
Peter
--
Added to Post:
Hello, somebody here??
It seems no ideas come along to my post? Any ideas? I am stuck ...
Could someone help me please and point me at least in the right direction?
Thank you🙄 !
i am using your free version of chronoforms V4 and i have to say this is far the best form-creator i have tryed out for joomla in all these years! Thanks for this great tool. I was already posting a review to Extension-Directory and i am even thinking of buying a Pro-Version eventually.
Anyway today i do have a big problem in setting up and using CF4 correctly (i guess).
Here is my issue:
I was setting up a multipage-form which is supposed to act as a survey, asking (registered) users about 10 questions, storing the records of the answers made into newly created a db-field which i linked to the form. Up to this point the survey itself works perfectly, if a user answeres all questions and submits, the data get stored in the db. So far so good.
Now i wanted to display ALL of these record entries, the "results of the survey(s)" to other (non-registered) users in a nicely formatted page-view.
So i created another (empty) 2. form with yet no fields(!), using the "DB Multi Record Loader" setting up the name of the db-field where the data of my first form gets stored in.
Inside the fields-column i was entering all the form-fieldnames i used in my first form as well as in the "Display-fields"-column of the "Data-Displayer"-Tab in comma-separated lists.
In the "On Records found" field i added a "Handly arrays" as well as a "Show Html"-event.
In the "On empty result" field is has just a custom code event, notifying me "Empty Table !!! No Data !!". After the "DB Multi Record Loader" i added a Stopper-Event to quit the form from running.
I was already also following the instructions of the "CFV4_db_multi_record_loader.pdf" of your tutorials, setting up another "CustomCode-Field" containing all the fields i was using in my first form, in the following syntax:
<?php
foreach($form->data['j25_choronoforms_data_mydata_basefield'];
?>
<tr>
<td>Name: <?php echo $detail['name']; ?></td>
... and so on ...
</tr>
<?php endforeach; ?>
</table>
So now my problem: everytime i am loading the 2. form that is supposed to show my data from db there is none! But the data IS stored in db...
I was already setting up a debugger, THERE it shows my data-records from db, but it isnt displayed inside my page(form) so:
What am i doing wrong???
Why isnt my data showing up?
How can i exactly set up Chormoforms to just display (non-edit) the record-entires of my first form inside a page?
I am really SORRY to bother with such easy stuff maybe, but i am busting my head off since hours with no result😫
Greatly apprechiate your quick help, thanks a lot in advance,
Peter
--
Added to Post:
Hello, somebody here??
It seems no ideas come along to my post? Any ideas? I am stuck ...
Could someone help me please and point me at least in the right direction?
Thank you🙄 !
Hi PePa,
This PHP is broken:
Bob
This PHP is broken:
<?php
foreach($form->data['j25_choronoforms_data_mydata_basefield'];
?>
I think you intended:<?php
foreach($form->data['j25_choronoforms_data_mydata_basefield'] as $detail ) :
?>
Bob
I created a form with two pages.
I want the result of the first page stored in the database. To allow the user to edit this result and to continue later filling the form at the second page
To do this, I added the action "Save DB" in the event "On Submit" and another action "DB Save" in the event "On pagetwo".
Is this is the right way to do?
For a user who will fill the two pages of the form at one go, we end up with two records
I want the result of the first page stored in the database. To allow the user to edit this result and to continue later filling the form at the second page
To do this, I added the action "Save DB" in the event "On Submit" and another action "DB Save" in the event "On pagetwo".
Is this is the right way to do?
For a user who will fill the two pages of the form at one go, we end up with two records
Hi rkamouni,
Basically I think that is OK except that the second DB Save needs to be on the Submit event for page two, not the on load event (otherwise there is no new data to save). You also need to make sure that the record id is carried through so that the same record is updated.
Bob
Basically I think that is OK except that the second DB Save needs to be on the Submit event for page two, not the on load event (otherwise there is no new data to save). You also need to make sure that the record id is carried through so that the same record is updated.
Bob
Hi Bob,
Thank you for your reply. However, I need more explanation:
- Should I add a new event that i call "On submit2 " (for example) in which I'll add "DB save". If the answer is yes, should I add something else to this event?
-how should I do so that the same record is updated (using record ID)
Thank you for your reply. However, I need more explanation:
- Should I add a new event that i call "On submit2 " (for example) in which I'll add "DB save". If the answer is yes, should I add something else to this event?
-how should I do so that the same record is updated (using record ID)
Hi rkamouni,
1) Yes; and you should add whatever other actions you want to run when the second form is submitted.
2) Usually the easiest way is to add a hidden input to your form with the name 'cf_id' (or the name of the primary key of your record if it is different). You'll need to get the value from the results that ChronoForms adds to the $form->data array after the first DB Save. You can use a Debugger action to see exactly what this is called.
Bob
1) Yes; and you should add whatever other actions you want to run when the second form is submitted.
2) Usually the easiest way is to add a hidden input to your form with the name 'cf_id' (or the name of the primary key of your record if it is different). You'll need to get the value from the results that ChronoForms adds to the $form->data array after the first DB Save. You can use a Debugger action to see exactly what this is called.
Bob
Hi Bob,
What do you mean by second form?
Here is my actual configuration:
[attachment=1]userdetails.png[/attachment]
[attachment=0]listdata.png[/attachment]
My goal is to create a form with two pages.
Once the user has responded to the questionnaire on the first page, I want the data to be stored in the database. Thus, the user can load the data (of the first page) and continues to respond to the questionnaire on the second page.
What do you mean by second form?
Here is my actual configuration:
[attachment=1]userdetails.png[/attachment]
[attachment=0]listdata.png[/attachment]
My goal is to create a form with two pages.
Once the user has responded to the questionnaire on the first page, I want the data to be stored in the database. Thus, the user can load the data (of the first page) and continues to respond to the questionnaire on the second page.
Hi rkamouni,
Sorry, the thread is titled "How to show the data of a form inside another?" and I read that.
The same applies with a multi-page form, add the DB Save actions to the Submit actions of each page.
Bob
Sorry, the thread is titled "How to show the data of a form inside another?" and I read that.
The same applies with a multi-page form, add the DB Save actions to the Submit actions of each page.
Bob
Hi Bob,
Great, this was my first idea.
For a user who will fill only the first page of the form and exit. The procedure (as you suggested) works well.
But for a user who will fill the two pages (at once), the record is duplicated.
Indeed, by clicking on "nextpage", a first record is made. A second one is performed when the user clicks "Submit".
Have you any idea how to prevent this?
Great, this was my first idea.
For a user who will fill only the first page of the form and exit. The procedure (as you suggested) works well.
But for a user who will fill the two pages (at once), the record is duplicated.
Indeed, by clicking on "nextpage", a first record is made. A second one is performed when the user clicks "Submit".
Have you any idea how to prevent this?
Hi rkamouni,
You need to keep the cf_id (or the primary key name if it is different) of the created record in the form data so that the same record is updated. Please check the FAQ for more info on this.
Bob
You need to keep the cf_id (or the primary key name if it is different) of the created record in the form data so that the same record is updated. Please check the FAQ for more info on this.
Bob
Hi Bob,
this solution does not seem to work for me. I add to my form "hidden box" that I renamed "cf_id".
Here's what I want, otherwise described:
Is it possible when you have a 10 page "Multi Page" to submit after page 5?
this solution does not seem to work for me. I add to my form "hidden box" that I renamed "cf_id".
Here's what I want, otherwise described:
Is it possible when you have a 10 page "Multi Page" to submit after page 5?
This topic is locked and no more replies can be posted.