Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
*Form Question with my php page*
Old 07-12-2011, 09:56 AM *Form Question with my php page*
Novice Talker

Posts: 7
Name: Shawn K
Trades: 0
Hi all! I have a form on my main page and I want to have the customer fill out a couple of the form items and then based on their selection be sent to the appropriate full form with the 2-3 choices already selected pre-filled out on the subsequent form.

I have seen it done - and I don't think it should be too complicated. Can someone give me a hint as what I should be looking to do to get started?
ILoveKnowledge is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-12-2011, 11:39 AM Re: *Form Question with my php page*
phazorRise's Avatar
Skilled Talker

Posts: 57
Name: Sachin Gutte
Trades: 0
myabe you are looking for a form that lies on more than one pages(too much long) or there are subsequent questions depended on what user enters first.

in that case you need to submit a part of form ( perhaps you can use ajax ) and then process the user entered input and generate subsequent questions from it.
i suggest, it's better you use Ajax cause it can generate subsequent questions/form fields without causing a page refresh and that looks cool too.
phazorRise is offline
Reply With Quote
View Public Profile
 
Old 07-12-2011, 07:44 PM Re: *Form Question with my php page*
lizciz's Avatar
Super Spam Talker

Posts: 807
Name: Mattias Nordahl
Location: Sweden
Trades: 0
As always. there are many ways to go. You could use ajax as phazorRise suggested, which is often handy. Could be tricky if you're new to ajax though. A simpler javascript solution could be to load the entire form on page but hide (CSS display:none the second part. Then use javascript to unhide it, when the first part is filled.

If you do not want to rely on javascript, the simplest way is probably to submit the first form to another page at which you will recieve the data and analyze it. Determine what the next part of the form should be and output that part. Either with a big if-else-construct or better yet include (with the include() or require() function) a file that has that part of the form.
__________________
Your answers will only be as good as your question. Formulate it well and give all the necessary information.
lizciz is online now
Reply With Quote
View Public Profile Visit lizciz's homepage!
 
Reply     « Reply to *Form Question with my php page*
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11654 seconds with 12 queries