A way to check for variable on registration agreement page?

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
splicker
Registered User
Posts: 8
Joined: Fri Jul 10, 2020 2:39 pm

A way to check for variable on registration agreement page?

Post by splicker »

Hi,

If, for example, I add a text field or checkbox to the registration agreement page, is there an event/way to check if that variable exists before continuing to main registration page?

So when someone clicks the "AGREE" button, I can check for something, if its not there then send them back to the agreement page.

Thank you.
User avatar
david63
Registered User
Posts: 18821
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Contact:

Re: A way to check for variable on registration agreement page?

Post by david63 »

How are you adding this new field/checkbox?
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored
splicker
Registered User
Posts: 8
Joined: Fri Jul 10, 2020 2:39 pm

Re: A way to check for variable on registration agreement page?

Post by splicker »

david63 wrote:
Mon Jan 11, 2021 3:12 pm
How are you adding this new field/checkbox?
I could use this event in the ucp_agreement template: <!-- EVENT ucp_agreement_terms_after --> add it in there.

I just don't know how to capture that click from the agree button press, run some checks, send user back to same page if outcome isn't what I want.
User avatar
david63
Registered User
Posts: 18821
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Contact:

Re: A way to check for variable on registration agreement page?

Post by david63 »

You might be able to set something with the core.ucp_register_agreement_modify_template_data event and then process it with core.ucp_register_data_before.

Not really sure what you are trying to do as the registration agreement has an Accept/Decline option that appears to do exactly what you are trying to replicate
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored
Post Reply

Return to “Extension Writers Discussion”