Jump to content

Hide field in sign up if particular field is selected


ludojlm

Recommended Posts

Hello ! 

I work with prestashop 1.7 and I'm making a B2B website. I need to make the SIRET field obligatory when the country France is selected, and optionnal if another country is selected.

I had several ways to do it:

- I add a label next to the field (like the "Optionnal" label) that would say "obligatory only if you're in France;

- I hide the field and it only if the good country is selected (in js, I think). 

The problem is, I don't know how to manage to do that within the form class. I'd also need the verification that would redirect back if the form is not okay. Has anyone got an idea on how to do it? Thanks a lot.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...