Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

86
Views
How to show/hide a textarea based on multiple radiogroups selection?

I'd like to show 1 specific textarea, whether is the first group of radios that is selected as "not okay", the second group, or if both are selected as "not okay".

I tried using this method.

const inputBox = document.querySelector('#textarea');
inputBox.style.display = 'none';

function hideShowJacks(event)
{
    const selectValue = event.target.value;
    if (selectValue === 'nok')
    {
        inputBox.style.display = 'block';
    }
    else
    {
        inputBox.style.display = 'none';
    }
}

I used the onclick attribute on both radio groups thinking that I would behave correctly, and it kinda does. But for example, If the first radio is selected as "Not Okay" (the textarea is shown), but after that I select the "Okay" option in the second group of radios, the textarea disappears, even though I selected the first one as "Not Okay".

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!