PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

change front-end display order of form fields made via WordPress plugin

  1. HI there

    I have a form field that has a number of check boxes that are linked to WordPress categories, eg

    auckland
    wellington
    christchurch

    (can't provide a link at the mo sorry)

    I have used a WordPress plugin to change the category order in WordPress so it is as above, not alphabetical.

    However the Gravity form does not read this I guess and therefore just displays the checkboxes in alphabetical order in the front end display, eg

    auckland
    christchurch
    wellington

    How can I change the order of these fields in the front end? I am not really a developer so ideally don't want to have to touch back end code.

    Hope that makes sense.

    Posted 7 years ago on Monday July 23, 2012 | Permalink
  2. The categories are returned in alphabetical order by Gravity Forms. If you want to change the order you will have to get your hands a little dirty and use the gform_pre_render filter to return the categories in the order you have set:

    http://www.gravityhelp.com/documentation/page/Gform_pre_render

    If you're not comfortable with that, you may have to hire some help. It's not difficult, but does require a bit of PHP knowledge to make it work correctly.

    Posted 7 years ago on Monday July 23, 2012 | Permalink
  3. That's awesome. I reckon I'll be able to figure it out - being pointed in the right direction is half the win! Thanks a lot.

    Posted 7 years ago on Tuesday July 24, 2012 | Permalink
  4. Please let us know if you need more help.

    Posted 7 years ago on Tuesday July 24, 2012 | Permalink
  5. To add to this, I have several post forms with a variety of check boxes, drop downs, and paragraph sections. I have it set up that it shows a preview of the post prior to submitting (works awesome!) Once its submitted as noted above, it posts in alphabetical order, not anything like the preview.

    I read the link above about the pre render and still have a question...

    Would all I need to use is:

    '<?php
    add_filter("gform_pre_render", "pre_render_function");
    ?>'

    to be able to order the post in the manner of the preview?

    Thanks :)

    Posted 6 years ago on Friday September 21, 2012 | Permalink
  6. WHAT is IT that posts in alphabetical order? Do you have an example of this happening online? And can you post the code to pastebin.com or pastie.org to show us how you're doing it? Thank you.

    Posted 6 years ago on Saturday September 22, 2012 | Permalink
  7. I apologize for not putting more detail into my post. :)

    I am using the code from here: http://gravitywiz.com/2012/08/04/better-pre-submission-confirmation/ inserted into my functions.php and the code below is what im using in my HTML section in each form. It previews just fine and appears in the order that I need it to, just when it posts is it out of order.

    Thanks again :)

    <body><strong>Make sure you check everything is correct before submitting. If there are errors, please click 'previous' to revise and resubmit. Should there be any issues after payment is recieved, please reach out to us through our '<a href="http://www.cofounder.us/contact-us">Contact Us</a>' page, use 'submission error' in the subject line to let us know what the errors(s) are.
    {:1}
    {:4}
    {:5}
    {:8}
    {:7}
    {:14}
    {:2}
    {:3}
    {:6}
    {:9}
    {:12}
    {:13}
    </strong>
    </body>
    Posted 6 years ago on Saturday September 22, 2012 | Permalink
  8. You mean when it creates a post, the fields are in a different order than you expect? If that is true, how are you getting the user-entered information into the post? Did you create a content template, or are you using the custom fields to create the post body in some other way?

    If you're not talking about creating a WordPress Post, then I'm afraid I still need more information.

    The pre-submission confirmation is completely unrelated to anything for the Post or the entry. It's just a display of the entered data in the format you desire.

    Posted 6 years ago on Sunday September 23, 2012 | Permalink
  9. Yes. When it creates a post, the fields post different than the form and the preview. I have it set up where everything except the post body, excerpt, and headline is a custom field. The custom fields are pulled in below the post body and CSS is then applied. Prior to adding the preview part, it would post in the correct order and all was perfect.

    I havent tried using a content template yet, Would setting a content template allow a specific order?

    Thanks again for the help :)

    Posted 6 years ago on Sunday September 23, 2012 | Permalink
  10. This is where you can control the order of the fields:

    The custom fields are pulled in below the post body and CSS is then applied.

    What does your theme template file look like, and what CSS are you using, if any of it is for positioning the fields?

    Yes, a content template for the post body would allow you to control the layout and the order. You can use the content template in Gravity Forms, for the post body, or use your theme template file, one or the other. Sounds like how you have done it in your theme template is not working any longer due to the order in which the data is being saved.

    Posted 6 years ago on Monday September 24, 2012 | Permalink
  11. YES! That's exactly what I wanted to do! That solved a BUNCH of problems!

    Thank you!!! :)

    Posted 6 years ago on Monday September 24, 2012 | Permalink
  12. Very good. Glad we got that sorted out.

    Posted 6 years ago on Monday September 24, 2012 | Permalink

This topic has been resolved and has been closed to new replies.