How do I pre-select automatically from a pull down menu

Got something cool to share with AppGini users? Feel free to post it here!
Post Reply
nycwebmaster
Veteran Member
Posts: 90
Joined: 2015-11-23 01:02

How do I pre-select automatically from a pull down menu

Post by nycwebmaster » 2020-01-03 20:48

Let's frame this question so it could be interpreted better:

Let's say that we have a database called Wellness_Events on this database I have 3 tables and they are called:

Events
Contacts
Snacks


Currently I have the application configured so when the user enters a new Event on the Events Table the customer is going to be automatically redirected to the next table to enter the Contact information on the Contacts table and finally it will redirect the user to enter the snacks.

The problem that I have is that when I redirect the customer to each step the customer has to select their company name as the foreign key. Is there a way that on each step I could redirect the customer the the respective state and also could Pre-Select from the pull down menu the company? The way that I'm doing the redirection for example to redirect the customer to the contact table is to enter in appgini on the "Redirect after insert" field as follows:

Event_Contacts_view.php?addNew_x=1

Is there a way to modify this redirection so it could automatically select the company name from the pull down menu?

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: How do I pre-select automatically from a pull down menu

Post by pbottcher » 2020-01-04 12:32

Hi,

you can try to use

Code: Select all

Event_Contacts_view.php?filterer_FIELDNAME=#ID#&addNew_x=1
where FIELDNAME needs to be replaced with the company name field in your db.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: How do I pre-select automatically from a pull down menu

Post by pbottcher » 2020-01-04 15:45

To add, the #ID# must match the lookup id for the company name where you pick the name from. Not sure that this will work accross multiple tables.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

nycwebmaster
Veteran Member
Posts: 90
Joined: 2015-11-23 01:02

Re: How do I pre-select automatically from a pull down menu

Post by nycwebmaster » 2020-01-04 17:04

Hi,

It did worked on the first redirection to the second table but then stopped working after the second one. If you find out how to do it across multiple tables please let me know and I will send my gratitude from Paypal.

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: How do I pre-select automatically from a pull down menu

Post by pbottcher » 2020-01-15 06:35

Hi,

send you a PM, but you did not reply. Maybe you can contact me via PM from your side.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

nycwebmaster
Veteran Member
Posts: 90
Joined: 2015-11-23 01:02

Re: How do I pre-select automatically from a pull down menu

Post by nycwebmaster » 2020-01-15 17:17

Hi,

Sent you the axp by link. Thanks,

Post Reply