Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
#794976
I have a dropdown in a grid with a value from a previous form entry (it's set to view only). Let's call it grid1 (dropdown is dropdown1). I would like to be able to populate another dropdown in a grid (dropdown2 in grid 2) with the value that was entered earlier in Javascript.

How do I do this?
#794999
Hi,

If I understand you correctly, you have two way:

1. With php and set a trigger before form2 like this:
Code: Select all
@=grid2[1]['dropdown2'] = @=grid1[1]['dropdown1'];
2. With php and javascript and create a hidden value in form 2:
first set a trigger before form2 like this:
Code: Select all
@@hidden_value = @=grid1[1]['dropdown1'];
second set javascript code in form 2:
Code: Select all
var temp = $('#hidden_value').getValue();
$("#form\\[grid2\\]\\[1\\]\\[dropdown2\\]").val(temp);
If you want to set multiple rows in grid2 set from grid1 you must use way1 and use loop.

Thanks
Want to create your own meme coin?

In the world of cryptocurrencies, a unique and exc[…]

The market for cryptocurrencies is demonstrating a[…]

What's SAP FICO?

Embarking on a dissertation can be one of the most[…]

Hello. For rental housing, there are software solu[…]