Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5949983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:19:43+00:00 2026-05-22T17:19:43+00:00

Possible Duplicate: Recommendation for javascript form validation library In my HTML page there is

  • 0

Possible Duplicate:
Recommendation for javascript form validation library

In my HTML page there is a radio button, if that radio button is selected it will enable a div containing a textbox.

I need some validation here. If the checkbox is selected and textbox is empty then the submit button should not work and it should remain on the same page.

How can i implement this?

edited the code so that it will work now.

How can I implement this in Play! Framework?
This is a part of my code

<div id="ask-poll">
    <form name="myform" action="@{Application.askquestion()}" onsubmit="return validateThisForm();">
    <div class="wf-group">
      <p><label for="questionText"><h3>Who do you want to ask for their opinion?</h3></label></p>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T17:19:44+00:00Added an answer on May 22, 2026 at 5:19 pm

    While this isnt a coded answer, there are a number of form validation javascript examples (hence Im not going to insult you by posting a bunch of links to them) where you can see how they use javascript to test if all the required elements are completed, eg, various “required” textboxes, a “have you read this” checkbox etc. You then implement this as part of the submit “onclick” and if its not valid you return “false” this prevents the form being submitted.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Recommendation for javascript form validation library I've got a HTML5 login form.
Possible Duplicate: Qt equivalent of PathAppend? Is there a class that handles file paths
Possible Duplicate: How to minify php page html output? Any reason not to strip
Possible Duplicate: Why not use tables for layout in HTML? Under what conditions should
Possible Duplicate: JavaScript: var functionName = function() {} vs function functionName() {} What's the
Possible Duplicate: Multiple forms on ASP.NET page i have a doubt. can we place
Possible Duplicate: Resetting a multi-stage form with jQuery Once the form submitted, response from
Possible Duplicate: Recommendations for dropdown menu items that are too wide? I have a
Possible Duplicate: Objective C for Windows I know there are several posts about this
Possible Duplicate: Is there some ninja trick to make a variable constant after its

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.