Skip Navigation

[Resolved] Creating a competition form

This support ticket is created 4 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 4 replies, has 2 voices.

Last updated by CraigS3893 4 years, 8 months ago.

Assisted by: Minesh.

Author
Posts
#1606749

Hi,
I've been asked to create a competition / giveaway site for staff of a large organisation, and just wondering if the following would be possible using Toolset Forms?

1. Competition form is created with usual fields (Name, email, Employee ID etc).
2. This writes posts to a "Competition Entry" post type.
3. DUPLICATE ENTRIES ARE NOT ALLOWED - so needs to check against Employee ID and reject entry if it's already in the system.
4. Redirects to "Thank You" page once complete.
5. "Competition Entry" post data can be exported, for later import into Campaign Monitor.

I guess the main thing is point 3 - screening duplicate entries - the rest seems straightforward enough. Can you confirm if this is all possible using only Toolset?

Cheers
Craig

#1606901

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

To validate the form, you can use the Toolset Form's API hook: cred_form_validate
=> https://toolset.com/documentation/programmer-reference/cred-api/#cred_form_validate

Where, you can write a query to fetch the posts having Employee ID and if posts are found you can return the error.

#1606905

Hi
Thanks for the reply.

Can you give an example?

#1606915

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Sure.

Please check the following related ticket:
=> https://toolset.com/forums/topic/check-posted-data-to-avoid-duplicated-entries/#post-589870

You need to adjust the code as per your post types, custom fields etc..etc.. as required.

#1606939

Thanks!