Hello again after a long break.
I have set up a very successful chronoform which gets required data from my clients. On submit it is put into the database and from that I extract it using JTable and use it in the system. BUT is this really necessary? Can I get the data directly from the completed chronoform on or after 'submit'. (I am using php although I am not fluent in it).
In one instance the form is placed in an article using the 'mambot' plugin and in another I call the form from a menu item.
I have another question to follow this one.
--
Dave
Hi daffy,
Which version of ChronoForms are you using? You can find the version from Site Admin | Extensions | Install/Uninstall | Components in Joomla! 1.5 or Site Admin | Extensions | Extension Manager | Manage in Joomla! 1.6.
If you are accessing it from ChronoForms the form data is held in the $_POST array in both cases; in CFv3 you'd normally access it using the JRequest methods; in CFv4 it's also copied to a $form->data array.
If you are accessing it from some other extension then saving it will be necessary probably to the database, possibly to the current User session.
Bob
Thanks bob,
I am using V3. I have just downloaded V4 and not installed it but will get over this hurdle first:
Here is the picture and further problem.
I have a site and use a chronoform to get clients data. After they have entered data I put a flag on the session 'gotdata' and can test this easily at any point and clear it if required.
After the client has submitted the CF I show him the financial effect of the data he has entered combined with other website input. I then want to offer him 'continue' or 'cancel'. Continue is easy just a link to the next step...perhaps checkout, but 'cancel' is not easy I want to wipe out the data he has entered and go back to the CF again.
There is no way a button can perform a function (wipe data) and provide a link back.
I have tried a hidden field and self-answering form but my mind boggles as I do this. Is there a standard way of achieving what I want?
I would email some beer but it makes such a sticky mess when I pour it on my keyboard!
--
Dave
Hi Dave,
Are you still in ChronoForms which this? Then you can have a form with two submit buttons. Check which one was clicked in the OnSubmit code and then add the PHP to delete the record and redirect the user.
Bob
Thanks bob, I get the idea.
--
Dave