Title: caspervk's Replies | WordPress.org

---

# caspervk

  [  ](https://wordpress.org/support/users/caspervk/)

 *   [Profile](https://wordpress.org/support/users/caspervk/)
 *   [Topics Started](https://wordpress.org/support/users/caspervk/topics/)
 *   [Replies Created](https://wordpress.org/support/users/caspervk/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/caspervk/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/caspervk/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/caspervk/engagements/)
 *   [Favorites](https://wordpress.org/support/users/caspervk/favorites/)

 Search replies:

## Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Copy text from text field to another textfield with press of a button](https://wordpress.org/support/topic/copy-text-from-text-field-to-another-textfield-with-press-of-a-button/)
 *  Thread Starter [caspervk](https://wordpress.org/support/users/caspervk/)
 * (@caspervk)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/copy-text-from-text-field-to-another-textfield-with-press-of-a-button/#post-8967605)
 * thanks for the answer! i have done with you suggested but its not working properly.
   
   The modal works, inside the modal are 2 buttons with option 1 and option 2. Now
   when i press these buttons it closes the modal, but it doesnt ectually replace
   the text as i wanted.
 * [http://pasteboard.co/P2cVlqoks.png](http://pasteboard.co/P2cVlqoks.png)
    i think
   the scripts-n-styles plugin isnt working correctly, because adding this code 
   doesnt seem to do anything, or am i doing something wrong?
 * ps: i also tried to use your previous code to see if it works outside a modal,
   but that doesnt work either:
    <p id=’total’>text</p> <br> <input type=”button”
   id =’one’ onclick=”change()” value=”Option 1″> <input type=”button” id =’two’
   class=”mnozstvi_sleva” value=”Option 2″> <br>
    -  This reply was modified 9 years, 1 month ago by [caspervk](https://wordpress.org/support/users/caspervk/).
    -  This reply was modified 9 years, 1 month ago by [caspervk](https://wordpress.org/support/users/caspervk/).
    -  This reply was modified 9 years, 1 month ago by [caspervk](https://wordpress.org/support/users/caspervk/).
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Copy text from text field to another textfield with press of a button](https://wordpress.org/support/topic/copy-text-from-text-field-to-another-textfield-with-press-of-a-button/)
 *  Thread Starter [caspervk](https://wordpress.org/support/users/caspervk/)
 * (@caspervk)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/copy-text-from-text-field-to-another-textfield-with-press-of-a-button/#post-8966831)
 * hello! yes thats it! allthough the option buttons would be displayed in a modal/
   popup and the text would be outside the modal. How do i implement this inside
   my website though?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Copy text from text field to another textfield with press of a button](https://wordpress.org/support/topic/copy-text-from-text-field-to-another-textfield-with-press-of-a-button/)
 *  Thread Starter [caspervk](https://wordpress.org/support/users/caspervk/)
 * (@caspervk)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/copy-text-from-text-field-to-another-textfield-with-press-of-a-button/#post-8962982)
 * bump
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Copy text from text field to another textfield with press of a button](https://wordpress.org/support/topic/copy-text-from-text-field-to-another-textfield-with-press-of-a-button/)
 *  Thread Starter [caspervk](https://wordpress.org/support/users/caspervk/)
 * (@caspervk)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/copy-text-from-text-field-to-another-textfield-with-press-of-a-button/#post-8962178)
 * Thanks for your response, yes i have been using easy-modal so far but i think
   u misunderstood what i wanted, so ill explain with images.
 * So on my page there is a little section with a text that i can click:
    [http://pasteboard.co/OyDgUgaS2.png](http://pasteboard.co/OyDgUgaS2.png)
 * After it got clicked it will open up a modal:
    [http://pasteboard.co/OyCBuNncu.png](http://pasteboard.co/OyCBuNncu.png)
 * I got this working so far, so here is what i need help with:
    after the modal
   is opened as u can see on the picture, there is an option 1 and option 2. I want
   both options clickable, and after the option got click i want the text as shown
   on the first image changed to “option 1”
 * maybe i forgot to mention but the chosen option, i will be using that to calculate
   a price for a product in my eshop.
 * thanks!

Viewing 4 replies - 1 through 4 (of 4 total)