Forums

Chrono security question or workaround

TjerkH 27 Sep, 2017
In CFv5 there was the action chrono-security-question, with the load-security-action and check-security-action in the setup. I can't find this action in CFv6 unfotunately. What is the workaround for this or is it still planned to come to CFv6?

Background:
I've a membershipform which has to be completed by new members. In order to avoid that everyone can submit the form (also people who don't want to become member, so called "funny people"). So a new member get's the question to complete the membershipform and is provided with the "pincode".
I know people can login to the site, but this would make it more complicated and less user-friendly.

Looking forward to a response,

Tjerk
GreyHead 28 Sep, 2017
Hi Tjerk,

I don't know if Max plans to add this or not but you can build it by hand. If you save the pin-codes to a table then you can use an Event Switcher action to check if the submitted pin-code is valid or not and either submit the form or reject it.

Bob
TjerkH 29 Sep, 2017
Hi Bob,

Thanks for the hint! What I did is the following:
1) I took a php action and added the following code
 if ( $this->data['provide_pincode'] == '2010' ) {
  return 'true';
} else {
  return 'fault';
}

2 I took an eventswitcher action and the name of de data provider is: {var: name of the PHP action}
the conditions are in the Event row.

It works, hoppefully others can benefit from this as well.

Once again,

Thanks
This topic is locked and no more replies can be posted.