This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

marcordzias
marcordzias

I have a project in which i show two selectors where one depends on the other, the data I have from a plugin in which I show the general data, in the first I will choose the municipality and this will bring his dependent state

mjauvin
marcordzias
marcordzias

mjauvin said:

Did you read this?

https://octobercms.com/docs/backend/forms#field-dependencies

Yes, but there is a way to do it through the database? Without having to generate the arrays one by one? Grab the data and send it to call? That State to select it then show you in the other select the dependent of the municipalities?

mjauvin
mjauvin

That's just an example, you can fetch the values form the DB if you want.

marcordzias
marcordzias

mjauvin said:

That's just an example, you can fetch the values form the DB if you want.

You will have an example? Taking the data of the drivers? I have the table municipalities and states where state is dependent ID field of municipalities, Greetings!

mjauvin
mjauvin

Can you show your Models definition?

marcordzias
marcordzias

mjauvin said:

Can you show your Models definition?

http://www.hdt.mx/material/pantalla-sucursales.png

The first field are the state that I want to send calling of my states table and this has an ID, which in the next field has the ID that relates and must be a autofill to show both data

1-7 of 7

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.