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 8642737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:51:16+00:00 2026-06-12T11:51:16+00:00

I have a jsfiddle application below: JSFIDDLE If you open the jsfiddle, you will

  • 0

I have a jsfiddle application below:

JSFIDDLE

If you open the jsfiddle, you will see a top control which contains “Answer” buttons. You will also see some letter buttons, a “True” button, and a “False” button.

The “True” and “False” buttons work perfectly, meaning that if the user clicks on “True” and then clicks on “False”, it replaces the text input as you can’t have an answer both “True” and “False”.

But there is a problem with the letter buttons. If you click on the letter buttons, you realise that you can click on multiple letter buttons which is fine, but the problem is that it replaces the text input for those letters which is incorrect. If multiple letter buttons are selected, then it should display the text inputs for all of those letter buttons, not replace the text input with the latest letter button selected.

So does anyone know what I need to change in the code in order to achieve this?

  • 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-06-12T11:51:17+00:00Added an answer on June 12, 2026 at 11:51 am

    You generate an data-hid for the button here:

    var hid = "hidden" + id + n + "value";  
    $(btn).attr("data-hid", hid);
    

    based on this you now generate an input field:

    var input = '<input type="text" id="' + hid + '" value="' + value + '" name="' + id + 'value" />';
    

    The id variable in this is the id of the button, which will be answerC for example. So with this you will get an hid of #hiddenanswerC0value when you first click the button.

    However when you add an answer the buttons will have an id generated like this:

    .attr('id', $this.attr('id')+'Row');
    

    So it will have an extra Row at the end. So the data-hid and the input box will be different as well (#hiddenanswerCRow0value).

    Edit:
    Another problem is that you don’t actually create the data-hid for the new buttons. You only create it for the first set of buttons after clicking on them. But when you create the second set (after clicking) with the C button already activated it will not have the data-hid set and therefore you cannot delete it.

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

Sidebar

Related Questions

I have an application which you can test in my jsfiddle to see how
I have a jsfiddle application which you can access here . Now when you
If I have an application which contains panels created with Ext.create, and those panels
I have a test application here which you can use: Please follow steps below
I have a Jsfiddle application here . If you type in a question in
http://jsfiddle.net/h2vMN/1/ I have a text box text inside it already, in the actual application
I have a page in JQuery mobile, which contains a form. The form has
I have this fiddle which has an error --> http://jsfiddle.net/Osoascam/AkZZr/6/ (This is the version
I have an Ember application with both a view and a controller: http://jsfiddle.net/gavriguy/EDr4G/ I
I'm creating a web application and I have some feature where the user can

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.