PHP + HTML form with select Restrictive

1

Greetings. I am starting out in this area of dev and have entered into a challenge of developing a Restrictive Form.

What does it consist of?

  • In this simple example I will use 3 selects

1 condition validation option value="AM" option value="PM"

2 - Containing schedules referring to the morning
example
option value="01:00"
option value="02:00"
option value="03:00"
option value="04:00"

3 - Containing schedules for afternoon / evening
option value="13:00"
option value="14:00"
option value="15:00"
option value="16:00"


When selected in the first select the option AM, the application calls the Select for the morning and when we select the option PM, we will do the same with the other form.

Please help me.

I use PHP, HTML and CSS. Any light that anyone can give me? Thanks in advance for your attention.

    
asked by anonymous 24.08.2016 / 05:47

1 answer

1

You'll have to use javascript or JQuery to get easier, with PHP having to alternate pages for each select.

First you must create the 3 select's on the page After that hide the 2 referring to the hours with the property display: none; in CSS

and when selecting AM or PM javascript gives a display: block; in the element to appear

Here's link

    
24.08.2016 / 06:45