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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:50:12+00:00 2026-05-24T13:50:12+00:00

A while ago I asked this question where I was taught to make the

  • 0

A while ago I asked this question where I was taught to make the label of a form input change according to what was selected in a dropdown div. All using javascript.

That was great but I went away and have only come back to it now and realized I actually need to collect that information as part of the form.

I’m using cakephp and that form goes to the register action in my users_controller, in that action I need to be able to tell which currency has been selected as well as how much they’ve typed in. I know I can get at how much they’ve typed in with $this->[‘User’][‘target’] but is there anyway to find out which currency they’ve selected or does that need to be an input too?

sorry for this probably being a real newb question but I am one 🙂

Thanks
Sarah

  • 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-24T13:50:14+00:00Added an answer on May 24, 2026 at 1:50 pm

    You can get at that via

    $("#currencylabel").text();
    

    or

    $("#currencylabel").val();
    

    or another variation, depending on what kind of element you are using for the label.

    Edit: this will get you the value in javascript, if you want it in PHP you will need to either put it in an input or post it back with javascript once you get it.

    Edit 2: To recommended method to get it would be to just make it an input, or to add a hidden input to the form. The hidden input would require that you change its value via javascript whenever a different currency is selected. This way, when you process the form in PHP, you will have the information there just as you have the value the user entered.

    Since the user is selecting a currency, I assume you already have some sort of input in place to allow them to do that (not sure what this dropdown div entails). If that’s part of the form, you already have what you need. If not, either include it in the form (if possible), or (if not) add a hidden input and update its value whenever you change the label.

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

Sidebar

Related Questions

Update I asked this question quite a while ago now, and I was curious
UPDATE 10/19/2010 I know I asked this question a while ago, but the workarounds
This question is related to this initial question asked a little while ago. Now,
This question was asked quite some time ago, and while it covers possible solutions
I asked this question a while ago. I now know it is a Bad
This is an extension of a question I asked a wee while ago which
I have question quite much related to this one I asked a while ago
A while ago I asked this question: using xslt stylesheet to convert xhtml blank
I asked this question a while ago and got an answer that I thought
A while ago, I asked a question about $ , and got useful answers

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.