Form elements with PHP
Introduction
This is in the works! Would you like to help flesh it out? Let's do it!
Basic form with text input
Here’s a little recap and a loose talk-through of a basic form. Did it all sound familiar?
For the most part text, email, password, search etc (all the text inputs) are pretty much the same – so, we’re probably don’t need a video about those in specific.
Note: Derek forgets something important. Can you spot it?
Numbers
This is where a video should appear, but no Vimeo ID has been added yet. Paste one in the editor — or want one recorded?
The select input
Choices with checkbox and radio
Persisting checkbox and radio state
This idea would apply to the select option element, too, right? Try and get that working next.
Showing range slider values to the user
See the Pen Showing range slider values to the user by perpetual.education (@perpetual-education) on CodePen.
OK… So…
The range slider didn’t come out until around 2012 (or later). If you think through how PHP works… how can we have an updated value show up on the screen as the user slides it? Just think through that for a bit. What do you think?
So, for all those reasons we’re sure you’ll come up with – this is a time when we really need JavaScript to update the webpage in a “live” way.
Here’s the JS part. But the PHP is still connected to the input via the name property. So, submitting the form will behave the same way.