Oct 31st, 2011, 6:16 AM
Hello,
I am a newcomer to formtools wondering about how to implement the following scenario.
The users create the forms through an initial registration - this is not a problem. What I want to do is to allow them to use the same user interface to update their data. They will login through an email ID /password combination, the form fields will be filled with the existing data, and they proceed to update the data just as they did while creating it.
I have taken a look at Submission Accounts module, but it seems to present it's own UI (which I believe can be customized?). But I would like to use the same custom UI with which the form was created.
I have also looked at ft_update_submission(.), but it seems to expect the $infohash parameter to come from the update submissions page in the admin panel (please correct me if I'm wrong!).
Here is the current solution that I have in mind:
- The user enters the email ID and password.
- I use ft_search_submissions to validate the login and retrieve records.
- I fill the form fields with the retrieved values.
- Instead of calling ft_api_process_form(.), I call my own function, myft_update_form($form_id, $submission_id, $data) to update the table. I of course have to name the DB columns etc. to sensible values using smart fill for this to work and deal with the DB directly.
My question: is there a cleaner way to do what I am trying to achieve through the API? The problem with bypassing the API entirely is that I have to manually do all the bookkeeping (such as modification date) that the API takes care of.
Thanks,
Arun
I am a newcomer to formtools wondering about how to implement the following scenario.
The users create the forms through an initial registration - this is not a problem. What I want to do is to allow them to use the same user interface to update their data. They will login through an email ID /password combination, the form fields will be filled with the existing data, and they proceed to update the data just as they did while creating it.
I have taken a look at Submission Accounts module, but it seems to present it's own UI (which I believe can be customized?). But I would like to use the same custom UI with which the form was created.
I have also looked at ft_update_submission(.), but it seems to expect the $infohash parameter to come from the update submissions page in the admin panel (please correct me if I'm wrong!).
Here is the current solution that I have in mind:
- The user enters the email ID and password.
- I use ft_search_submissions to validate the login and retrieve records.
- I fill the form fields with the retrieved values.
- Instead of calling ft_api_process_form(.), I call my own function, myft_update_form($form_id, $submission_id, $data) to update the table. I of course have to name the DB columns etc. to sensible values using smart fill for this to work and deal with the DB directly.
My question: is there a cleaner way to do what I am trying to achieve through the API? The problem with bypassing the API entirely is that I have to manually do all the bookkeeping (such as modification date) that the API takes care of.
Thanks,
Arun