Hello,
I am looking for some assistance in a task I am not sure the best way to tackle.
I have a form that I need to store the data in my database when it is submitted.
Once data is submitted I need a page in the manager that displays this data.
Could anyone advise of a method of completing this task?
Thanks.
Landon
Does this concern frontend or backend submission? In the backend, you can simply collect the form’s fiels with Ext.
Ext.fly('form-id').getForm().getValues();
Submit that to a processor of a custom component or just a processor in the modx dir and finished!
@MarkGHErnst
Developer at Adwise Internetmarketing, the Netherlands.
It is the latest version of Revolution.
And the form will be processed on the front end, not within the manager.
for the form you can use formit and something like formit2db or formit2resource as hooks.
If you use formit2resource you will see them as resources in the manager-resource-tree.
If you store them in your own table you will need to create a CMP (custom-manager-page) to display them.
Quote from: Bruno17 at Oct 19, 2010, 12:20 PM
for the form you can use formit and something like formit2db or formit2resource as hooks.
If you use formit2resource you will see them as resources in the manager-resource-tree.
If you store them in your own table you will need to create a CMP (custom-manager-page) to display them.
I think formit2resource would be the best option in this case. Is this part of formit or an added snippet?
Then I can display it 2 ways:
1) Provide a manager login to a user that can only view those resources.
2) Create a front end user login and use getresources to display those resources on the front end.
I wonder which would be quickest?
Quote from: landonpoburan at Oct 19, 2010, 12:45 PM
I think formit2resource would be the best option in this case. Is this part of formit or an added snippet?
formit2resource (see my signature) is an example how you can use formit-hooks to store formit-form-datas to resources.
You have to alter the code to save them as private resources to a given resource-group.
Quote from: landonpoburan at Oct 19, 2010, 12:45 PM
Then I can display it 2 ways:
1) Provide a manager login to a user that can only view those resources.
2) Create a front end user login and use getresources to display those resources on the front end.
I wonder which would be quickest?
you can do both. It depends.......
I think its easier to create a front-end-login for them and display those resources with getResources.
May be others have different suggestions.
Quote from: Bruno17 at Oct 19, 2010, 02:48 PM
Quote from: landonpoburan at Oct 19, 2010, 12:45 PM
I think formit2resource would be the best option in this case. Is this part of formit or an added snippet?
formit2resource (see my signature) is an example how you can use formit-hooks to store formit-form-datas to resources.
You have to alter the code to save them as private resources to a given resource-group.
Quote from: landonpoburan at Oct 19, 2010, 12:45 PM
Then I can display it 2 ways:
1) Provide a manager login to a user that can only view those resources.
2) Create a front end user login and use getresources to display those resources on the front end.
I wonder which would be quickest?
you can do both. It depends.......
I think its easier to create a front-end-login for them and display those resources with getResources.
May be others have different suggestions.
Thanks so much. I will be starting this tonight. How does the snippet create the resource though? Say my form has 50 fields, does it just create it as text in the resource?
you can create for each field a TV or store them all as an array in Json-format to one TV or into the content-field, for example.
Then you need a little snippet which encodes the Json before you can display this fields.
Quote from: Bruno17 at Oct 19, 2010, 03:52 PM
you can create for each field a TV or store them all as an array in Json-format to one TV or into the content-field, for example.
Then you need a little snippet which encodes the Json before you can display this fields.
Is their a default that formit2resource uses?