How to make textarea popup if radio button is clicked

Hey Guys I really have two questions

  1. I’m trying to replicate a job application form on this website https://www.suntecconcrete.com/careers/careers-online-application/
    I’m trying to replicate the pop up textarea that is shown if “yes” is clicked on the radio button question that asks if the applicant has been convicted of a crime. If yes a textarea shows up to provide further information. How do I do this with Javascript, html or css. Cause that’s all I know

  2. the text field that asks for a cell phone has a placeholder of “(xxx)-xxx-xxxx” but when the field is clicked to enter a given phone number it keeps the format of “()-_____” how is this done? thanks for the help:)

#1 can be done using just CSS.

#imahiddenbox {
   display: none;
}

#imacheckbox:checked ~ #imahiddenbox {
  display: block;
}

good to hear from you again m_hutley! I wasn’t aware there was a :checked pseudo class, I’ll read about it. Also what’s with the’~’ what is this called and how does it work?

This is called input masking; on the page you linked they seem to be using this jQuery plugin:

(Apparently this one is not getting maintained any more though…)

Thanks:)

Dang I haven’t learned jquery yet

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.