xnau on "[Plugin: Participants Database] 2 forms on the same site?"

ساخت وبلاگ

gilesytheking
Member
Posted 3 days ago #

I want to create 2 forms, 1 for over 18's and 1 for under 18's. The under 18's form will have some extra fields that they have to fill out.

Is it possible to create 2 forms for this purpose? Or could I create a field then when selected (18 or under 18) the the extra fields are displayed?

https://wordpress.org/plugins/participants-database/

It's easier to do two different forms. If you've got some javascript skills, you can do it on one form.

To make different forms, you can put your extra questions into their own group, then use the groups to control which fields are shown:

[pdb_signup groups="main,personal"]

Then for underage users:
[pdb_signup groups="main,personal,under18"]

gilesytheking
Member
Posted 2 hours ago #

I have managed to create 2 forms with different fields using the groups and shortcode as you described.

I have also created a hidden field so that I know which signup form / page was used (Over 18 or under 18).

My next question is how can I apply the same logic to the edit page? A member who used the over 18 signup form, should only be able to view those groups relevant to the over 18 signup form, when editing their details.

The [pdb_record] shortcode works the same way, the problem is you'll need to change the URL for the user depending on which form you want them to use. You'll need to use a custom template for the list to do that. How are you with PHP?

Another possibility is to set up a custom template on the record form that determines which fields are shown based on the user's age. That way, you're only using one page for the record edit.

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 63 تاريخ : جمعه 3 ارديبهشت 1395 ساعت: 2:46