Hi, I have two CCK multivalue fields (a nodereference field and a textfield), both with a set amount of maximum values. My goal is to build a form that lists these fields as 'nodereference + textfield' groups, in order to simplify user input. This doesn't seem to be so easy to do with form_alter(), since a multivalue field is an array of its own, so re-ordering the fields seems tricky. Does anyone have ideas on how to approach this? thanks, - bruno
In the face of things like this, we often turn to the form construction to do what you want. However, you may be far better off looking at the theme function. Just take the values by key and build a table to put them side-by-side. Nancy E. Wichmann, PMP Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr. ________________________________ From: Bruno De Bondt <bruno@indymedia.be> To: development@drupal.org Sent: Thu, March 4, 2010 4:32:32 PM Subject: [development] re-arranging mutlivalue fields Hi, I have two CCK multivalue fields (a nodereference field and a textfield), both with a set amount of maximum values. My goal is to build a form that lists these fields as 'nodereference + textfield' groups, in order to simplify user input. This doesn't seem to be so easy to do with form_alter(), since a multivalue field is an array of its own, so re-ordering the fields seems tricky. Does anyone have ideas on how to approach this? thanks, - bruno
Hi, you may have a look at the 6.3 branch of CCK. A multigroup has been introduced, which can handle multiple single fields (i.e. noderef + text) as one. regards Raimund Hofmann Bruno De Bondt schrieb, am 04.03.2010 22:32:
Hi,
I have two CCK multivalue fields (a nodereference field and a textfield), both with a set amount of maximum values. My goal is to build a form that lists these fields as 'nodereference + textfield' groups, in order to simplify user input. This doesn't seem to be so easy to do with form_alter(), since a multivalue field is an array of its own, so re-ordering the fields seems tricky.
Does anyone have ideas on how to approach this?
thanks, - bruno
participants (3)
-
Bruno De Bondt -
nan wich -
Raimund Hofmann