WordPress.org

Ready to get started?Download WordPress

Forums

Content Types
[resolved] Enforcing required fields (10 posts)

  1. Drivetrain
    Member
    Posted 3 years ago #

    Required fields don't seem to be enforced. If I Publish a content type while leaving one or more required fields blank, I receive an error message but the content is still published, and I can navigate away from the edit screen without correcting the error. Thus, required fields that are empty show a warning message but don't prevent publishing. Can this be changed so that content cannot be published until all required fields are completed?

    http://wordpress.org/extend/plugins/content-types-wordpress-plugin/

  2. iambriansreed
    Member
    Plugin Author

    Posted 3 years ago #

    I haven't figured out how to stop the post process. For now it is just a warning.

    I tried a few different things like change the post status to draft as well as the warning but no luck. Any ideas out there?

  3. Drivetrain
    Member
    Posted 3 years ago #

    If you detect a blank field, is it possible to issue an HTTP redirect to the edit page before writing the content to the database? The challenge would be to redirect to the edit page while preserving the data in completed fields.

  4. iambriansreed
    Member
    Plugin Author

    Posted 3 years ago #

    @Drivetrain - after messing around trying to solve this server side I went ahead and made a client side solution.

    The fix is in Version 1.6.0.
    It isn't set as the stable version though so you have to do a direct upload.

    http://downloads.wordpress.org/plugin/content-types-wordpress-plugin.1.6.0.zip

    Let me know how that works out and I will make it stable.

  5. iambriansreed
    Member
    Plugin Author

    Posted 3 years ago #

    I fixed this in version 1.6.0 which is now the stable version.
    Try it out and let me know what you think.

  6. Drivetrain
    Member
    Posted 3 years ago #

    Many thanks! It will be a day or two before I can install and test it. I'll let you know how it goes...

  7. iambriansreed
    Member
    Plugin Author

    Posted 3 years ago #

    Thanks!

  8. Drivetrain
    Member
    Posted 3 years ago #

    Just tested it -- works great! Thanks again!

  9. iambriansreed
    Member
    Plugin Author

    Posted 3 years ago #

    Remember to mark that it works!

  10. swinhoe
    Member
    Posted 3 years ago #

    Great Plugin... thanks. :)

    (Marked as working...)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic