Editor 1.6 Form Template lists fields in reverse order

Editor 1.6 Form Template lists fields in reverse order

brendonsbrendons Posts: 39Questions: 14Answers: 1

I just updated to 1.6.0 and converted an existing page to use a form template.
All works except for some reason the editor-fields in the template render in reverse order.
For example

<editor-field name="enrollment_applications.SubGrade" />
<editor-field name="enrollment_applications.CurrentGrade" />
<editor-field name="enrollment_applications.ContactName"/>
<editor-field name="enrollment_applications.ContactEmail" />

renders the form with ContactEmail at top and SubGrade at bottom.
Not what I expected.
Is there a sort order I'm missing somewhere or should I just re-arrange my editor-field lines?
Cheers
Brendon

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,834Questions: 1Answers: 10,518 Site admin

    Not what I expected.

    Nor I! Can you give me a link to the page so I can debug what is going wrong please?

    They should appear in exactly the same order that you have your editor-field elements.

    Allan

  • brendonsbrendons Posts: 39Questions: 14Answers: 1

    Hi Allan
    Unfortunately it's only on localhost at the moment. I will run it up in a public space asap.
    Thanks for the quick reply.
    Best regards
    Brendon

  • allanallan Posts: 63,834Questions: 1Answers: 10,518 Site admin

    That's be great - thanks. Drop me a PM by clicking my name above and then "Send message" if you don't want to make the link public.

    Allan

  • allanallan Posts: 63,834Questions: 1Answers: 10,518 Site admin

    Hi,

    Just wondering if you had any luck with this? I'm hoping to be able to drop Editor 1.6.1 tomorrow and if there is a bug here it would be great to got the fix in.

    Thanks,
    Allan

  • brendonsbrendons Posts: 39Questions: 14Answers: 1

    Not yet Allan sorry

  • allanallan Posts: 63,834Questions: 1Answers: 10,518 Site admin

    No worries. Just give me a shout when you've got it up and running and I'll take a look at it then :smile:.

    Allan

  • allanallan Posts: 63,834Questions: 1Answers: 10,518 Site admin
    Answer ✓

    For anyone else reading this thread, the issue is caused by the use of self closing tags such as:

    <editor-field name="one"/>
    <editor-field name="two"/>
    

    The HTML specification for custom tags doesn't mention self closing tags at all, so what we need to do is:

    <editor-field name="one"></editor-field>
    <editor-field name="two"></editor-field>
    

    The Editor documentation currently incorrectly shows the short tag example. I'll be deploying an update to the site later today to correct that.

    Allan

This discussion has been closed.