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: 1021
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: Mass Update plugin: Update multiple records at once and improve your workflow efficiency.

:arrow: Summary Reports plugin: Build powerful reports and charts for your AppGini apps.

:arrow: Search Page Maker: Compose user-friendly yet powerful search pages for your AppGini apps.

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