Drop down option selected open text...

User 172277 Photo


Registered User
22 posts

A client wants a form with a drop down that asks how the site visitor found them. Of the 14 options, in 3 cases, if that option is selected, a text field is to open in which the visitor enters text.

For example, if they select "in a brochure" the site visitor is asked to enter in what city they found the brochure.

Can this be done in Web Form Builder (not the classic-flash - version)?

If so, can anyone help me with how.

Or, will I just have to add three text fields after the drop-down, which is likely not to be acceptable to the client?

Thank you,
User 2073552 Photo


Registered User
1,625 posts

Prism has a good setup...

Take a look here...

http://phpsnippets.webatu.com/decission.html
"An Apple doth not fall far from its tree, yet an orange does."

https://lbwebsitedesign.com - Responsive Web Design & Web Hosting Services.
http://helpsite.sirage.com - HTML5, CSS3 and CC Help Video Blog.
User 172277 Photo


Registered User
22 posts

Thanks SirAge,

I went to that page and, while it looks intriguing, I am not sure how it relates to my issue. Is there more information on what Prism has done?

Thanks!
User 187934 Photo


Senior Advisor
20,271 posts
Online Now

Make a radio button choice and click on the submit and it will take you to the zip file that you can download.;)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 464893 Photo


Ambassador
1,611 posts

Klaus if you want help on what I have demonstrated I can explain http://inkmon.org/contact.html

The examples are basically just that to show the type of things that can be done with output from the Web Form Builder. The next example I am working on by a choice sends a visitor to a page depending on the selection. I am including how it can also point to a payment option.

This last example will become redundant shortly as WFB will have that in the next upgrade. However there is only so far it can go so there are many ways that data can be manipulated.

Coming will be a chance to change the data entered after a form is submitted prior to perhaps continuing to another form.

Long range how to manipulate data stored in a database. I am actually learning on the go. It is a chance to come to grips with data handling. A lot of examples exist on the net and just require tweaking to use.

I am pretty good at client side programming, this gives me experience server side
The Guy from OZ


User 464893 Photo


Ambassador
1,611 posts

Klaus

I Knocked it together quickly but still to set up the file download, the script is dead easy as shown here,
watch for line wrap. I will tidy it up over the next couple of days.

As you can see many choices could be made not only on that element but others if desired allowing And/Or or any other logical decision, writing output to display, file or email.

In your case If one of 3 factors are true the visitor would be directed to another form for their input.


<?php
error_reporting(E_ALL & ~E_NOTICE);
$file_handle = fopen("http://phpsnippets.webatu.com/PaymentChoice/storage/csv/results.csv", "r");
while (!feof($file_handle)){
$item = fgetcsv($file_handle, 1024);
if($item=="")Break;// Loops through file till last item reached
$itemlast=$item;
}
fclose($file_handle);
$choice= $itemlast[0];// This is the position of the choice in the csv file
//could be a switch or if statement
If($choice=="OpenPage2"){
header('Location: OpenPage2.html');
}
If($choice=="Autorun"){
header('Location: Autorun.html');
}
?>

The Guy from OZ


User 270158 Photo


Registered User
20 posts

Please Can someone tell me also how this is done.:)
User 2147626 Photo


Ambassador
2,958 posts

What exactly are you trying to do with your form? Do you want to re-direct to another form or page? Or something else? The more information you can give us, the better we can help. :cool:
Graphics for the web, email, blogs and more!
-------------------------------------
https://sadduck.com
User 270158 Photo


Registered User
20 posts

Hi,

If someone choose say employed in the drop down field, it should give them a form to fill out for their work address. If you take a look at this form on the page below under "Employment Information" section. When someone choose employed or self-employed they have a field that they have to fill out. How do I create something similar to this?


https://services.myngp.com/ngponlineservices/contribution.aspx?X=CHePA4L3TWDN07ayIgDUd%2bgU48n8m42GSp1iRsFugIY%3d

Please help and sorry if I'm confusing you.

https://services.myngp.com/ngponlineser … RsFugIY%3d
User 187934 Photo


Senior Advisor
20,271 posts
Online Now

Use the built in conditionals to control what gets displayed when each is selected from the drop down.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.