Default Value for lookup list using the registered member's data as the value

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
ikatikah
Posts: 6
Joined: 2017-02-02 04:05

Default Value for lookup list using the registered member's data as the value

Post by ikatikah » 2017-03-20 15:29

Hi,

I'm trying to make a lookup list where the default value will be defaulted to the user's data. In this case the user will register his state, area, and beach. And then I have this table where the user will have to choose from the lookup list in which where he is from to enter the data. I'm really at lost as to how am I going to modify, will be either in the table_name.php hook or the table_name-dv.js hook
lookuplist.png
This is how the lookup list is right now, and I am trying to make the state, area and beach lists to be defaulted by the user's data for his own state, area and beach.
lookuplist.png (6.99 KiB) Viewed 848 times
I hope the community can help me solve this problem.

Thanks in advance.

R Tammam
Veteran Member
Posts: 112
Joined: 2017-08-26 15:35

Re: Default Value for lookup list using the registered member's data as the value

Post by R Tammam » 2017-12-13 22:56

Hello ikatikah ,

i think first , you will write your code in dv hook function in table_name.php
as it contains html variable where you can edit your html code
and in it you can fist check if the user is going to insert a new record or not by checking if there is a selected id value or not
if there is no selected it so it's a new inserted record so you can retrieve users data and populated the drop downs with them

i hope it helps :)

Post Reply