This topic is locked

User ability to pick fileds.

10/30/2009 6:29:28 AM
PHPRunner General questions
M
mmponline author

I have a project where the users can register a project. They can then copy a link that they send to people where the people can then add there information and submit the information. (A form - similar to "get a quote" form on the cars and property templates.
Now:
I need a way to allow the logged in user to decide what fields must be displayed on this form when users fill it in. The form is obviously related to the id of the logged in user.
Eg.

When project 1 form is visited the user can add eg.

Name

Surname

Do you require accommodatine?

Dietary requirements?
When project 2 form is accessed, they only have

Name

Surname

Dietary requirements and maybe.

Do you require transport.
All these options will be added as fields to the table, and the logged in used should have the ability to click which fields should be added to his reply form. (Show /don't show)

I'm sure there is a way. Please help with some pointers.
See example of this form:
http://www.functionrsvp.co.za/functiondb/userfunctions_view.php?editid1=20

J
Jane 10/30/2009

Hi,
here are some tips:

  1. create new table with settings for each form,
  2. check these settings and show/hide fields on the add/edit page in the List page: Before display event:

    http://www.asprunner.com/forums/topic/6196-how-to-hide-controls-on-addedit-pages/

M
mmponline author 11/2/2009

My problem is that each form will differ according to the client's preferences. IOW the client should ideally have the option to add the fields by choosing (activate) the fields he wants to display.

Eg.

Client 1 choose fields 1,2,3,4

Client 2 choose fields 1,2,3,5

Client 3 - choose fields 1,2,4,5

etc.
Somehow the client must have the ability to selct the fields he wants to display for a specifiec form. I know this is not simple, that's why I'm seeking help to achieve this.

Probably something like a Active (Yes/No) field should be set for each field that can be activated with if statements related to that field.

If Active1 is Yes, show Field1 on the add page. etc. But this should be related to the specific user and form.
I hope someone can make sense of my explanation.

J
Jane 11/2/2009

Stephan,
firstly I recommend you to create new table for all these settings.

Then you can publish your project on Demo Account and open a ticket at http://support.xlinesoft.com sending a URL to your pages along with description on how user should fill these settings.