0

I am trying to figure out if it is possible to change the order of elements in a webform variant.

Using a very simple example form with two elements, I created a new variant and then overrode the "Elements" yaml two different ways, neither which changed the order of the elements on the form.

First, I simply switched the order of the elements in the yml, which didn't change anything. Second, I added a #weight attribute to each element with different values - this had no effect as well.

Is it possible to change the order of elements in a variant?

thanks,
-mike

New contributor
Michael Anello is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
0

Your need to reorder elements makes sense. The #weight attribute is currently ignored because it can cause unpredictable rendering. I don't think a Variant can reorder elements without patching the webform module.

Your Answer

Michael Anello is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.