Conditional Content

show code after enter licence

9 months 4 weeks ago #75671

Serge Billon's Avatar Serge Billon

Hello,
a sport federation has a promo code for hotels, but only want to display it for those who enter in a box a code formatted like that :
A-03-039948
would it be possible to verify this befor displaying the code with your extension ?

9 months 4 weeks ago #75673

Peter van Westen's Avatar Peter van Westen Admin

Depends. Does that code get stored in the database somewhere?
You can write your own custom PHP condition that can grab that information from wherever it is stored.

Conditional Content works on the php (server) level. So this can only be done if the information is stored before the page loads.

9 months 4 weeks ago #75677

Serge Billon's Avatar Serge Billon

no it isn't.
the behaviour is that the user enter the code : A-03-039948 or B-02-123456 ... and so on, and if the format is respected then the promo code is shown.
but it is not stocked

9 months 4 weeks ago #75678

Peter van Westen's Avatar Peter van Westen Admin

No, cannot do that with Conditional Content.
You would need a javascript based solution.