TOPIC:

Creating a password field 9 years 5 months ago #105643

  • Topic Author
  • Philip
  • Offline
  • Junior Member
  • Junior Member
  • Registered
  • Posts: 26
  • Thanks: 0
I want to create an initial page for my form where the guest has to fill in a specified password to be able to carry on to the next page.
I need a validation script which will only let the user to carry on if he or she enters the right password. Can anyone help me ? I don't know how to write script, but this particular one can't be too complicated...

Please Log in or Create an account to join the conversation.

Creating a password field 9 years 5 months ago #105670

  • lennerd
  • Offline
  • Administrator
  • Administrator
  • Registered
  • Posts: 4669
  • Thanks: 411
Hello Philip,

yes something like this is possible:

1. create a page with a password element and give it the name "password" (label could be different)

2. go to the validation section of this element check "custom" and copy the following code into the box:
function ff_password_validation(element, message)
{
    if (element.value!='mypassword') {
        if (message=='') message = element.name+" faild in my test.\n"
        ff_validationFocus(element.name);
        return message;
    } // if
    return '';
} // ff_password_validation

Now you can get only to the second page if 'mypassword' is provided as password.

I hope this helps.
Regards,
Stefan

===============================================
Satisfied? Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
===============================================

Please Log in or Create an account to join the conversation.

Creating a password field 9 years 5 months ago #105730

  • Topic Author
  • Philip
  • Offline
  • Junior Member
  • Junior Member
  • Registered
  • Posts: 26
  • Thanks: 0
Hello Stefan,
Thankyou very much for your quick reply.
However, I tried the script but it does not work. I put it in and changed the password but when I preview the form it doesn't work. When I click on submit nothing happens whether the password is correct or wrong.
I then put in the script without changing anything and still it doesn't work,
I am using quick mode if that makes any difference,
Best
Philip

Please Log in or Create an account to join the conversation.

Creating a password field 9 years 5 months ago #105748

  • chrisal's Avatar
  • chrisal
  • Offline
  • Platinum Member
  • Platinum Member
  • Registered
  • Posts: 6983
  • Thanks: 630
Hello Philip,

please send me the Package of your form, so i can have a look.
Create Package

Attach it to your next post(.zip/.txt extension and no underscores in the filename)

regards
Chris

Please Log in or Create an account to join the conversation.

Creating a password field 9 years 5 months ago #105758

  • Topic Author
  • Philip
  • Offline
  • Junior Member
  • Junior Member
  • Registered
  • Posts: 26
  • Thanks: 0
Hello Chris,
here it is.
thank you,
Philip

Please Log in or Create an account to join the conversation.

Creating a password field 9 years 5 months ago #105804

  • chrisal's Avatar
  • chrisal
  • Offline
  • Platinum Member
  • Platinum Member
  • Registered
  • Posts: 6983
  • Thanks: 630
Hello Philip,

i'm sorry but there's no attachment?

Please use my email address instead:
christian.salezius@gmail.com

regards
Chris

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Moderators: ForumSupport
Time to create page: 0.052 seconds

Support Chat

Join our Discord chat and enter the Crosstec channels for live-support, chat forums and interact directly with the community!

After joining, please enter the Crosstec Area and use the #crosstec-support or #crosstec-general channels.

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Subscribe to news and updates!

Special Offer

Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Live Support Chat Opened!

Join our Discord chat here and enter the Crosstec channels to receive live support and talk directly to the team!