read text value of select

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
hubert
Posts: 17
Joined: 2018-12-06 22:32

read text value of select

Post by hubert » 2018-12-09 21:25

Hi,

Have a few select and looking to read the text value (not the ID) selected in order to construct identificator.
I'm not very clear with JS but I tried..
Can read ID with "document.getElementById" but all code after like "select.options[ index ].value" give issue.

Any idea ?

User avatar
a.gneady
Site Admin
Posts: 962
Joined: 2012-09-27 14:46
Contact:

Re: read text value of select

Post by a.gneady » 2018-12-12 12:51

If this is a lookup field in one of your AppGini detail view forms, try:

Code: Select all

$j('#s2id_fieldname-container').text().trim()
(Replace fieldname with the actual field name)
:idea: Learn all the tips and tricks of customizing AppGini apps through our online course.

:arrow: Summary Reports plugin enables you to build powerful reports and charts inside your AppGini application through a few simple steps. See the big picture and discover trends in your data that empower you to take the right decisions confidently.

:arrow: Search Page Maker enables you to build user-friendly yet powerful search pages for your AppGini application by simply dragging and dropping the fields you want to include in search.

hubert
Posts: 17
Joined: 2018-12-06 22:32

Re: read text value of select

Post by hubert » 2018-12-14 08:37

Excellent Ahmad, it's a lookup field and works fine !
Many thx !

Post Reply