Welcome, Guest
Username: Password: Remember me

TOPIC: Multiple Many-to-many, to the same table in the same layout

Many-to-many, view form not displaying field 11 Jul 2016 13:00 #14204

  • lastradacook
  • lastradacook's Avatar
  • Offline
  • New Member
  • Posts: 13
  • Thank you received: 1
  • Karma: 1
Hello I have a problem :

I'm making a component for volunteers registration. The registration is mainly a form with the name and 2 fields : "banned areas" and "preferred areas" ( the volunteer can choose one ore more "banned areas" and on or more "preferred areas" from a drop-down list".

I have several tables :
- table "volunteers"
- table "areas"
- table "volunteer_N_bannedareas" (a pivot table between "volunteers" and "areas") for "banned areas"
- table "volunteer_N_preferredareas" (a pivot table between "volunteers" and "areas") for "preferred areas"

I can creaté the form "volunteer" with the "builder > pages > layout > item" form with the fields :
- name
- prefered areas : ( Type : N:m || Pivot table : volunteer_n_preferredareas || Value field : Title)
- banned areas : (Type : N:m || Pivot table : volunteer_n_bannedareas || Value field : Title

But when I "run in sandbox", the view does not display the "prefered areas" field but it displays the "banned areas" field,

what I'm doing wrong ?

Philippe
Attachments:
The administrator has disabled public write access.

Many-to-many, view form not displaying field 11 Jul 2016 13:16 #14205

  • Romkabouter
  • Romkabouter's Avatar
  • Offline
  • Elite Member
  • Posts: 310
  • Thank you received: 131
  • Karma: 48
Try it with two different fieldnames (you now have 2 "areas")
The administrator has disabled public write access.

Many-to-many, view form not displaying field 14 Jul 2016 22:15 #14252

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
This is a limitation at the moment. It is not possible in the builder, but you can edit the relations in your models constructors.

I should have a look, in this case. It is possible to add the feature.
Coding is now a piece of cake
The administrator has disabled public write access.
Time to create page: 0.078 seconds

Get Started