Registration Form triggers for CB Auto Actions

3 years 1 week ago #324201 by krileon
Where is this code stored? If it's just a field they fill out during registration then you don't need CB Auto Actions for that and can do that using CB Query Field and its Query Validation.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

3 years 1 week ago #324218 by mlilge
Query Validation was a very good hint!

The code is the actual invite_code generated by CB Invites. The user is not supposed to reenter this code during the registration process as the invite_code field gets automatically populated with the parameter taken from the url. An invite_code's expiry date is stored in a private db table.

I published the invite_code field to the registration form as it seems to be mandatory for the registration process. Sadly, it seems that Query Validation does not have any effect on the invite_code typed field?

That's why I added a new textfield to manually enter the very same invite_code. For this custom field the Query Validation works very well.

So, overall Query Validation would help me to reject a registration attempt with an invite code that has been expired. However I'm not satisfied with the options I have figured out so far.

- If I can not add a Query Validation to the invite_code field I do not like to have the user copy the same code to another custom input field just for the validation.

- If I could have just this custom input field I would like to get the content populated either from the url or from the real invite_code field. Not sure whether it is really mandatory to publish the invite_code field on the registration form to successfully complete the process?

- Lastly, is there an option to make a required field read only on the registration form?

I would be happy with a non-editable field that holds the CB Invites generated invite_code that would allow me to Query validate the code against my private expiry date table when the user hits the submit button. Hope you have further suggestions!

Please Log in to join the conversation.

3 years 1 week ago #324247 by krileon
Seams like it'd just be easier for me to implement invite expiration functionality in CB Invites per the following feature ticket so you won't need any custom solution at all and can just let CB Invites handle it.

forge.joomlapolis.com/issues/8381

Will review this feature and see if I can have it implemented tomorrow as it should be simple enough.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

3 years 1 week ago - 3 years 1 week ago #324252 by krileon
Ok, this is now implemented in latest CB Invites build release (should be available in a few minutes). Within CB Invites > Parameters > Invites you can now specify an "Expiration Timeframe". This uses PHP relative date formats. So if you want the invite to expire 1 day after it was sent you'd use +1 DAY, for 1 hour you'd use +1 HOUR, etc.. It's supported in the validation of the invite_code field as well so it should immediately tell them if it's expired or not.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

3 years 1 week ago #324270 by mlilge
Nice, but I'm not quite sure whether this implementation helps me.

Guess this new "Expiration Timeframe" is a system setting that's been added to all invites' "sent" timestamp at registration time since I cannot find a new column in the jom_comprofiler_plugin_invites table that would hold an individually calculated expiration date.

My use case requires an absolute expiration date: All sent invites are valid till an event the user has been invited to starts. So, the closer to an event's startdate the invite has been sent, the shorter the remaining expiry timeframe. With a system wide "Expiration Timeframe" of 1 DAY, say, an invite would get invalidated too late if an user has been invited hours before the event kicks off.

The "Event_Startdate" varies across different events users can get invited to in parallel. For my solution I have AAed the calculation of the expiry date, stored it in a private table and would like to validate against it at registration time.

If an "invite code" typed field does not allow for a custom query validation (why not?) I see two more options:

1) Add an "absolute expiry date" field to the jom_comprofiler_plugin_invites table that gets validated by default if set and can get updated by an AA.

2) Allow for a more sophisticated php coded "Expiration Timeframe". Most likely the validation rule is "now() > sent + Expiration Timeframe". If one could substitute "Expiration Timeframe" with "Event_Startdate - sent" the rule would validate as needed. However, this would bring this validation very close to a standard query / code validation, which I would prefer.

Please Log in to join the conversation.

3 years 1 week ago #324271 by krileon
The reason query validation doesn't work on the invite code field is it already has an ajax validation rule and fields can only have 1 ajax validation rule applied to them. So the validation will work, but it's only going to be applied when they actually attempt to register.

Will review adding a parameter to turn off the invite fields ajax validation. This should allow you to then use Query Validation to add your custom validation to the field. Should have a build release out sometime today with that parameter added to the field under Parameters > Validation of the fields edit page.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.243 seconds

Facebook Twitter LinkedIn