I know do that in CF but Is it possible, very simply, populate a select from data's linked table?
In fact, when we have to use CF instead CC to manage our project?
up
I have a table with honor
- id
- name
- image
and I would want to load it in a select in a form which manage the table users and honors named map_honor with :
- id
- user_id
- honor_id
- note
I create DB Read with
- multi-read, enable model id and fields = id,name
no relation, no db extern
And a dropdown field in chronoform form
- Field name and id = Honor_map[honor_id]
dynamic data enabled
- Value key = id
- Text key = name
nothing appears in the select, it seams I need something else :-)
thanks to all
chris
Hi webcrea,
Have you set a Model ID in the DB Read? you should set that to e.g. honour_map and then add honour_map to the Data Path box in the Dynamic Data tab of the Drop-down element.
Bob
Thanks Bob,
That works fine in direct call from chronoform admin but not when when I call from "Edit" list(chronoconnectivity) ...??
Chris
I try to define the front list same as admin list and I have this error message when I click view connection
Connection's name not present!
do you have an idea maybe?
thanks a lot
Hi chris,
I'm not sure why calling from CC would make a difference :-( But I'm not an expert in CCv5 by a long way.
If you add a Debugger to the form On Load event do you get any useful clues?
Bob
I create an option menu to the connectivity list with connection name and the list is published well. But edit button opens the form without the dropdown filled !?
hello bob and thanks to help me,
I'm agree with you, it's not clear for me too :-)
The result comes from a db read where users is the table master and comprofile a belongTo because I need a field "authorized_instructor" to load only some users. (25000 users)
In the db Model Id=user and fields id,username
I don't understand why there are indexed in data
I understand your solution I try it...
Hi chris,
Do you have a Model ID set in the DB Read - that should put the results in a named sub-array?
Bob
The data were there and my question is, a form can be call directly and from a connection list and work correctly or I have to choose to construct 2 forms
Hi webcrea,
Sorry but I don't understand your question :-(
Bob
Hello bob,
sorry for my english. The form works alone but not when I call it from a list (_EDIT_). The input text field were correctly informed but not the dropdown. All the dropdown are empty. I don't understand why. You can see the $form->data in my previous post
thanks
chris
Hi webcrea,
I still find this hard to understand. How are you loading the honor array when the form loads from the EDIT link? It looks as though the DB Read is finding no results in this case?
Bob
Hello Bob,
I found it, there was a conflict with name :-((
I named honor options honor_opt and it works
thanks for your help
chris