Safariphoto Posted August 16, 2016 Share Posted August 16, 2016 I see that in the W3.Css demo and templates there is use of forms. When I tried to edit this for use with HTML/PHP The button for the HTML form only works when the Modal Submit is used. <div id="id01" class=" w3-modal" > ... <form action="subscribe.php" method="POST"> <input name="subname" class="w3-input" placeholder="Full Name" type="text" required> <input name="subemail" class="w3-input" placeholder="Email Address" type="text" required> <label class="w3-label w3-validate">Subscribe to e-Mail Newsletter</label> <input class="w3-btn" type="submit" value="Submit"> <p><a class="w3-btn w3-center" href="">Submit</a></p></form> ... I've also tried the following and the variables are not passed to the php script. ... <form> <input name="subname" class="w3-input" placeholder="Full Name" type="text" required> <input name="subemail" class="w3-input" placeholder="Email Address" type="text" required> <label class="w3-label w3-validate">Subscribe to e-Mail Newsletter</label> <p><a class="w3-btn w3-center" href="subscribe.php">Submit</a></p></form> ... Any help is appreciated. Thanks Mike Link to comment Share on other sites More sharing options...
dsonesuk Posted August 16, 2016 Share Posted August 16, 2016 Are you talking about the link? Its a link it will just go to link specified in href, the value of '#' will just go to current form page again. At the minimum you require the location value to send input values to specific page applied to action attribute and a input type submit button, or button element. A link will only work if javascript function is triggered that will submit the form as though a submit button was clicked. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now