input box in DOM

input box in DOM

montoyammontoyam Posts: 568Questions: 136Answers: 5

I have a custom button that is going to update a field, but it needs to pull from an input box where the user is going to enter a rate. I thought I had seen an example of an input box in the DOM next to the buttons, but I can't seem to find it.

This question has accepted answers - jump to:

Answers

  • rf1234rf1234 Posts: 2,949Questions: 87Answers: 416

    I have a custom button that is going to update a field, but it needs to pull from an input box where the user is going to enter a rate.

    You should post the code of your custom button. Or post a test case as per the forum rules. It is pretty easy to get the value from an input box and use it in a custom button: use jQuery please.

    var theInput = $('#theIdOfYourInputBox').val();
    ... do something with "theInput" in your custom button
    
  • montoyammontoyam Posts: 568Questions: 136Answers: 5

    Sorry, the question is: is it possible to place an input box in the DOM?

    I tried something like this but it didn't work:

    dom: "'<input type="text" id="rate" name="rate">'Bfrtip",
    
  • kthorngrenkthorngren Posts: 21,172Questions: 26Answers: 4,923
    Answer ✓
  • colincolin Posts: 15,237Questions: 1Answers: 2,599
    Answer ✓

    This example may also help, there's an input element for page navigation,

    Colin

  • montoyammontoyam Posts: 568Questions: 136Answers: 5

    Kevin, yes, that was the example that I was looking for but couldn't find again.

    Colin, I love how you added a div so the button stays on the same line as the input. I ended up using your example.

    Thank you so much for both your help.

This discussion has been closed.