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.
By AbbesMA
#795370
Hi,
I have a dropdown control in a grid and I would like to get the label on the dropdown control in javascript Dynaform and in PHP Trigger.

Thanks
User avatar
By amosbatto
#795404
To get the label of the selected option in a dropdown box in a grid, you can use this JavaScript:
Code: Select all
var selected = $("#productList").getText(2,3);
Where "productList" is the ID of the grid, using the second row, and the dropdown box is the third field in the row.

To get the label of the selected item in a trigger:
Code: Select all
if (!empty(@=productList) and count(@=productList) >= 2) {
   $selected  = @=productList[2]['productType_label'];
}
Where the grid is associated with the variable named "productList", using the second row, and the ID of the dropdown box is "productType" and its label is stored in "productType_label". See the documentation on grids and turn on the case debugger to learn more.

Web3 development encompasses creating decentralize[…]

The Upland Clone Script, offered by Dappsfirm, rep[…]

Dappsfirm offers a bet365 clone script that mirror[…]

🚀 Tauchen Sie mit Immediate Alora AI in die Welt d[…]