Skip to content
Advertisement

Tag: forms

Hidden Input Values not being passed through form to New URL

I have a small html file working in the frame of a website. It currently requests a zip code and then calls a php page to query the database. The iframe gets the id number from the parent page and then gets the zip code from its own page. Here is the code snippet. However, When I enter the zip

Symfony2 Validating an optional field

In my form, I have a field with required option set to false, this field is optional. However, I would like to have a notBlank validation on this field when the field is used: Right now, I can’t use the validation constraint NotBlank because it will cause my form validation to fail when the field is unused. I tried something

Submitting a form using

I’m having a little trouble with this and can’t see what I’m doing wrong. I have this form: So when the user clicks the button it should submit the form then have this PHP to act upon the form (I know that the sql isn’t a prepared statement and is vulnerable to injections but this will be done later): However

Change Form Elements Depending On Selected Option

I have seen several sites where there is a form, starting with a dropdown box, and depending on the box chosen there is different form elements, for example, let’s say I wanted to make an uploader script, the dropdown box might hold: And is Upload is selected I would want a browse file element, while with Delete selcted maybe only

Multiple inputs with same name through POST in php

Is it possible to get multiple inputs of the same name to post and then access them from PHP? The idea is this: I have a form that allows the entry of an indefinite number of physical addresses along with other information. If I simply gave each of those fields the same name across several entries and submitted that data

Advertisement