close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

insert form field depending on radio or dropdown list selection

Thread began 1/11/2014 1:21 pm by Miguel | Last modified 1/12/2014 8:12 pm by Miguel | 688 views | 3 replies


insert form field depending on radio or dropdown list selection

Hello Every one

I have a form for email setup for a cms i making, what im trying to accomplish is that i have a drop down list menu where the user selects either if its PHP mailer or SMTP i also have a javascript that show hides divs if php mailer is selected all other fields are hidden but if the user selects SMTP, then it shows text fields for Hostname, Login, Password, Port and so on, so if my user selects SMTP he has to fill those field if he saves or updates, they are filled in the database the next time i go in to that update file, i select PHP mail, but the SMTP fields are filled with the data from the database and even if they are in a hidden div they get inserted again so what i need is some kind of condition that if i select PHP mailer it deletes the data or makes it NULL again in the database , im trying something like this but with no luck yet:

<?php echo ((isset($_POST["etype"]) && $_POST["type"] = "PHP")?($_POST["hostname"]):"NULL"); ?>

I think im missing on a way that if its the other type it should insert values on what is in the form field any help?

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...