-
A little help please
Hi all.
I'm having some trouble with a certain project. Basically the site offers automatic inquiries about our services. When the form is filled out it is then sent to a certain e-mail. Dynamically added form elements are used in all the forms. In most of the forms a div is created and then the elements. Each element is named with an increasing name value(e.g. element1,element2 etc) so i can access them with a php loop later. In one of the forms it is required to create a div and optionally another one inside it. So when i post i can't get values from elements in the inner div, although i've traced them and the naming is correct. I'd be thankful for any advice on the subject!!
-
-
You will need to post code, a link to your page, or something else in order for us to be of any help to you.
The form may not be sending properly, the elements may not be named properly, or the php loop to find them may not be working properly.
Remember, the other option is to name the second div of elements something different than the main div (like "elements2_1", etc.)
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
The Following User Says Thank You to djr33 For This Useful Post:
-
Source
Thanks for the quick reply. Sorry about the lack of code of anykind. My mistake.
Here is the code for the forms.
Sorry for the formatting and clearance of code. I know it's messed up but that's my type of faulty writing. Thanks again for the help!
-
-
More useful example
Hi guys.
I posted the attachment with the previous post because the site wasn't uploaded anywhere. Now i can give more useful links:
The page that is working: http://www.flyingcargo-bg.com/test/enqair.html
And the one that isn't working: http://www.flyingcargo-bg.com/test/enqsea.html
Regards.
-
-
If you give your elements names ending with [], then you can access them as an array within PHP. For example, if you have a set of inputs called foo[], and send them using POST, then in your PHP script they will be accessible as an array $_POST['foo'].
-
-
Re:
Thanks for the advice. Will try this first thing tomorrow morning. Hope it works out. Funny thing is that i continued to trace elements after post today and they seem visible, but no such thing in php. Hope this works! Thanks!
-
-
Not working
I tried the above method, but it doesn't work either. It still does not want to access variables and objects in the innermost div. The dynamically created div is only removed when it contains the objects created by its own script. When the other script for the inner lying div creates some elements the outer cannot be removed and the inner elements cannot be accessed!
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks