Jump to content

Radio Button that Populates Text Fields


damaya

Recommended Posts

I have a text area where the user types in a domain, and below that I have two radio buttons, YES and NO, and this is what I want to happen, but not sure how to do it...

 

If radio button YES is selected, then a lookup on the given domain happens, and a bunch of text boxes appear on the page.

 

If the lookup of the domain finds any records (A, MX, CNAME, etc), then those fields are populated with the found values. If nothing is found, then the text fields are left blank. I'm just not sure I can assign an action to a radio button like that without the user having to hit a submit button...

 

If radio button NO is selected, then a submit button appears on the page.

 

The part I am really having trouble wrapping my mind around is having that radio button perform the action of checking the DNS records for the domain and then populating the fields on the same page without having to hit submit. Please let me know if there are any good tutorials on this, or anything to at least get me on the right track. I greatly appreciate it, thank you!

Link to comment
https://forums.phpfreaks.com/topic/204959-radio-button-that-populates-text-fields/
Share on other sites

So, I would have jQuery start the PHP script that does the DNS lookup when the YES button is checked, and jQuery populate the fields after the lookup returns results?

 

I'd love to be pointed in the direction of a good tutorial or a decent start, because I am an epic failure at Google when it comes to trying to figure this one out.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.