I created some fields and then a pagebreak and then changed the order of the fields.
But all fields displayed always on the 1st page.

After deleting them and the pagebreak I created another pagebreak and after that the needed fields for the 2nd page.

Now it works.

Comments

theard’s picture

Isn't this behavior that is desired.
Why would you want a page without any fields on it?

drupa11y’s picture

StatusFileSize
new26.68 KB

think this is a misunderstanding.

Another example:
- I have a form with 2 pages and now add 2 fields I want to add on page 1.
- I reorder the 2 additional fields on the top of the field-queue and save.

But the 2 fields display not on page 1 but on top of page 2 which means that reordering does not work correctly after a pagebreak is created.

Attached the screens, hope you understand now.

ehalber’s picture

I am confirming this bug.

pheno’s picture

Confirmed.

I was creating a form and thought to add page breaks later after major components had been setup. Form seemed to structure components according to cid (component id I think) which is the automatic index creating key. It needs to be weight.
Tried looking for the query that gathers and orders components, and got lost.

james.elliott’s picture

StatusFileSize
new634 bytes

I've done some work on this issue. The diagnosis I came across was that when the components are being pulled from the db they aren't being ordered by weight. This patch adds weight ordering to the query.

james.elliott’s picture

Status: Active » Needs review

Oops, needs review

quicksketch’s picture

Status: Needs review » Fixed
StatusFileSize
new652 bytes

Looks good to me, the original D6 query is this:

  $result = db_query('SELECT * FROM {webform_component} WHERE nid = %d ORDER BY weight, name', $node->nid);

So we need to order not just by weight by also by name for consistency between versions. I've committed this patch. Thanks all.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.