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.

Category dropdown resets

  1. seemsse
    Member

    I have setup a form to create a post and I have a dropdown of selected categories. I was testing the form and I did not fill out one of the required text fields. After receiving the validation messages I noticed that my category dropdown reset back to the first category listed. This is a problem since the category dropdown did not receive a validation message, many people will fill in the fields they missed and hit submit without checking the category again.

    Is there a way to fix this?

    Thanks,

    Posted 14 years ago on Saturday February 13, 2010 | Permalink
  2. Erwin van den Boogaard
    Member

    After all the trouble I had populating the drop down and pre-selecting a value, I discovered the same reset problem. This definitely needs to be fixed, but like seemsse asked: how?

    Posted 14 years ago on Saturday February 13, 2010 | Permalink
  3. It's going to depend on how you are pre-populating the field.

    Since you, and not Gravity Forms, are pre-populating the field... when validation happens it doesn't know that the field needs to be pre-populated. so depending on how you are doing it, it's not going to happen.

    What method are you using to pre-populate the field?

    Posted 14 years ago on Saturday February 13, 2010 | Permalink
  4. Erwin van den Boogaard
    Member

    In my case it's via Jan Egbert's suggestion described here:
    http://forum.gravityhelp.com/topic/drop-down-value-different-than-content-text

    add_filter( 'gform_pre_render_7', 'populate_dropdown' );
    function populate_dropdown($form) {
    [bunch of code]
    }

    But note that it does populate. It's the selected value that gets reset.

    Posted 14 years ago on Sunday February 14, 2010 | Permalink
  5. seemsse
    Member

    Actually I'm just using the category dropdown field provided in the form setup and I select the categories I want to appear in the dropdown.

    Posted 14 years ago on Sunday February 14, 2010 | Permalink
  6. It looks like this is a bug with the Post Category field. We'll get this resolved in the next release. Thanks!

    Posted 14 years ago on Monday February 15, 2010 | Permalink

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