Title: ragos's Replies | WordPress.org

---

# ragos

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

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

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Forminator Forms – Contact Form, Payment Form & Custom Form Builder] How to give value to ‘select’ element through Javascript?](https://wordpress.org/support/topic/how-to-give-value-to-select-element-through-javascript/)
 *  Thread Starter [ragos](https://wordpress.org/support/users/ragos/)
 * (@ragos)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/how-to-give-value-to-select-element-through-javascript/#post-14599397)
 * Thanks for the answer.
 * You’re saying I can’t use something like an eventHandler to see if the ‘select’
   element changes?
 * Why can’t I do something like:
 *     ```
       document.getElementById('select-2-field').addEventListener('change', function_name, 
       false);
       ```
   
 * I’ve already accomplished changing/selecting an option from the other ‘select’
   element, now I want to do that when the first ‘select’ element changes. That’s
   why I was trying with an eventHandler with it’s ID, but it’s not working
 * Thanks again for the answer
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Forminator Forms – Contact Form, Payment Form & Custom Form Builder] How to give value to ‘select’ element through Javascript?](https://wordpress.org/support/topic/how-to-give-value-to-select-element-through-javascript/)
 *  Thread Starter [ragos](https://wordpress.org/support/users/ragos/)
 * (@ragos)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/how-to-give-value-to-select-element-through-javascript/#post-14599002)
 * Update: I’m trying this now, which I think it’s supposed to work, but it doesn’t…
 *     ```
       <script>
   
       jQuery(document).ready(function() {
   
           jQuery("#select-2-field").change(function() {
               var val = jQuery(this).val();
               jQuery("#select-3-field").val(val);
           });
       });
   
       </script>
       ```
   
 * I just want to update the value of a select element, based on the previous select
   element.
    -  This reply was modified 4 years, 10 months ago by [ragos](https://wordpress.org/support/users/ragos/).

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