14 comments found

  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 6-7 years
  • Mexico

Useful work!. One thing, works automatically with a custom post types too? Or only for this case with the API .

I liked. Sure bookmarked.

interconnectit

Thanks! It works automatically with any public custom post type using the get_post_types() function. It then checks what features the post type supports and adds the appropriate options to the admin area.

You can also add custom validation rules to any post type or group of post types you want.

jtorres_mora

Perfect!. One more reason for buy it. Sure for my next project!

interconnectit

Thank you! You can embed it in a theme as well. I’ll be updating the readme in the downloaded file tomorrow.

jtorres_mora

Thanks. See you soon.

  • Bought between 1 and 9 items
  • Has been a member for 0-1 years

Compatible with WooCommerce?

Could we see a screenshot with WooCommerce enabled?

interconnectit

I’ll check on compatibility but I don’t see why it wouldn’t support the product post type out of the box.

interconnectit

I just tested with woocommerce and it works great. I’m uploading some screenshots to show it so hopefully they’ll be approved shortly.

  • Bought between 1 and 9 items
  • Has been a member for 2-3 years
Otto24 Purchased

Do this plugin works out of the box or do i need to do something else to integrate it in my site?......I have activated it as indicated in my wp control panel but it doesnt have any effect on the forms fields i wanted to make required, not even the basic fields included in the plugin.

interconnectit

Hi Otto – it really should work fully and straight out of the box.

Can you provide the steps you’ve been through, check the settings were definitely saved, and which fields you’re talking about as well as confirming that those fields were definitely not blank.

It’s possible that another plugin is conflicting and adding js to the admin, or it could be something else.

So can you try this on a test copy of your site without other plugins active and/or deactivate other plugins on the site you’ve installed it on?

Ultimately we need to try to recreate the problem here in order to help – given the wondrously large range of themes, plugins and install combinations out there it can be difficult to trap each case.

interconnectit

Hi again, can you confirm if the plugin is actually not doing anything after checking some of the options for required fields in the Settings > Writing screen in admin?

Default-user
Otto24 Purchased

Hi, sorry for the late answer, i have tried again and the plugin doesnt seem to have any effect on the fields i want to make required. (just testing with the basic fields that appear in the admin panel of the plugin)

interconnectit

Hi Otto, can you tell us which theme you are using, and any other plugins you have active? What version of WordPress are you using? Also which fields did you check as required under the Settings > Writing screen in admin?

Default-user
Otto24 Purchased

if you like i can give access to my site….

interconnectit

Sure, send the details in a private message and we can take a look.

Default-user
Otto24 Purchased

great i have sent you the login data for my site in a private message.

interconnectit

Hi – I’ve logged in using Firefox and this worked fine on a new job I created where the required field is set for Tags. The plugin showed where tags haven’t been input, although the styling of the box that surrounds an element as uncompleted is slightly amiss due to the UI elements added by the pricerr theme.

I also tried to log in with the test user account supplied. That’s a front-end input system using the pricerr theme – we can’t enforce required fields in that – it’s up to the theme to either add support for the plugin or for the theme’s form itself to enforce the required field. That should be a relatively simple adjustment for you or the theme dev to do.

The Required Post Fields plugin can only deal with WP back-end functionality where there are appropriate hooks supplied by WP. Anything that adds its own posts UI either has to know about our plugin (unlikely given its relatively newness) or has to implement its own checking.

I’m afraid that from a front-end perspective there’s likely not a lot we can do to help.

Default-user
Otto24 Purchased

thank you for checking, will see how i can solve that.

Default-user
Otto24 Purchased

Hi again, i would like to ask if you can integrate this plugin in my theme, a coder gave a look at it but coulndt make it work. thank you

interconnectit

Hi Otto, the plugin is specifically designed to work with the WordPress admin. To apply it’s rules to a custom front end edit screen we could take a look but will have to send you a separate quote via email.

  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 6-7 years
  • Mexico

Works great. Now I am inside.

One question only, how I can do for a custom field?

I just see your help file. But is confusing for me.

How I can get a little example for a custom field, that I can see in backend? (for can select or not)

I wait for you help

interconnectit

You need the name of the field you want to make required. So if you’ve added a custom field with a key called ‘george’ the following should do the trick:

register_required_field( ‘george’, ‘George must be filled in’ );

If you’ve added the field to the UI in some unconventional way (or if somebody else has) then it might not work in that use case.

jtorres_mora

Thanks for you response (sorry for the delay, I have had days of hard work) I not test your instructions yet, but maybe today in the night I go to try it. Thanks again.

  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 6-7 years
  • Mexico

I am very happy with your great solution. Now never forget fill any field. Super recommended for any Wordpress user who need to have the full control for the full filling fields.

Of course I just leave my 5 STARS.

Thanks for this nice work.

interconnectit

Thank you so much! That really means a lot to us :)

  • Bought between 10 and 49 items
  • Canada
  • Has been a member for 3-4 years

Will this work with the Posts 2 Posts plugin to make connections required?

interconnectit

Hi, assuming that the Posts 2 Posts information is posted from the edit screen then you could add a custom rule to check for it. We’ll be happy to provide examples for you along with the documentation in the download.

interconnectit

Just checked and yes, you could use the following example in your functions.php:

register_required_field( ‘p2p_connections’, ‘Connections are required before publishing’, false, ‘post’, ’#p2p-from-posts_to_pages’ );

  • Bought between 1 and 9 items
  • Has been a member for 2-3 years
  • United States

Does this plugin support taxonomies? (making taxonomies a required field)

Please advise, would love to purchase but taxonomies must be supported.

interconnectit

Hi Caroline, yes by default you can make categories (other than just ‘uncategorized’) required and also tags required. I can provide simple code examples on how to make any custom taxonomies required as well using the function provided by the plugin.

  • Exclusive Author
  • Has been a member for 1-2 years
  • Romania
  • Bought between 50 and 99 items

Hi there! One pre-buy question.

Can I add a validation rule for a custom field value like this:

If another post have the custom field (from a custom post type) with the same value not to let me publish the post? Basically I have a custom post type wich has a “Phone” field and I do not want some of my users to enter 2 posts with the same phone.

And if yes, it is very difficult?

Thanks in advance. Alex.

interconnectit

Hi Alex, you would need to write a custom validation function but it’s possible. You would just need to write something like the following but with your post type name, meta_key, input name and CSS selector substituted:

register_required_field( 'phone_field_name', 'A post with this phone number already exists', 'check_phone_exists', 'custom_post_type', '.field-css-selector' );

function check_phone_exists( $value, $postarr ) {
      $posts = get_posts( array( 'meta_key' => 'phone', 'meta_value' => $value ) );
      return empty( $posts );
}
Default-user

Hi, Interconnectit! And thanks a lot for the quick answer.

I bought the plugin and installed. I also added inside the plugin (required-field.php) the function that you gave me with the modified values.

The problem is nothing is happening. The same, I can publish a post even if the phone wich I enter already exists. I am 200% sure that something I did wrong or not did at all.

So, can you please help me a little bit further by pointig me some steps (like where to insert the function and if I have to do something else in addition) to get the job done?

I am using “Advanced Custom Fields” (by Elliot Condon) and I am really stuck in the dark with this validation.

A lot of thanks in advance. Alex.

interconnectit

Hi again Alex, sorry I didn’t specify where to put the code! You will need to put it in your theme’s functions.php file.

I didn’t realise you were using the ACF plugin so that makes things slightly harder. I may need to put together an update for this plugin to make integration with ACF easier. At the moment ACF generates different HTML input names that don’t actually match the field name you enter. If you bear with me I’ll test it out and provide an update ASAP.

In the meantime can you tell me:

  • The custom field name you entered in ACF (not the label)
  • The custom post type name (not the label)

And I’ll write you a working code snippet you can add to your functions.php file.

Default-user
Hi, Interconnectit! And thanks a lot for the reply. Very elegant from your side to try to help me. Than again, it is normal from my side to “bear with you” a little for some really good stuff. :) In the meantime, I write you what you request from me:
  • the field name is “telefon_client”;
  • the post type is “clienti”.
Thanks again for the help and waiting your answer.

Alex.

interconnectit

Hi Alex,

I really appreciate your patience! So I’ve just uploaded a new version that fixes validation for custom fields. Try adding the following to your functions.php at the bottom:

if ( function_exists( 'register_required_field' ) ) {

function check_phone_exists( $value, $postarr ) {
    $posts = get_posts( array(
        'meta_key' => 'telefon_client',
        'meta_value' => $value === null ? false : $value,
        'meta_compare' => '=',
        'post__not_in' => array( $postarr['post_ID'] )
    ) );
    return empty( $posts );
}

register_required_field( 'telefon_client', 'A post with this phone number already exists', 'check_phone_exists', 'clienti', '#acf-telefon_client' );

}
  • Bought between 100 and 499 items
  • Has been a member for 1-2 years
piglabs Purchased

what was changed it this update?

interconnectit

This was a mainly a cosmetic update so that the styling of the error messages looks right in WordPress 3.8

  • Bought between 10 and 49 items
  • Has been a member for 1-2 years
iatown1 Purchased

great plugin. i read the “read me” file, but i can’t figure it out. I am not that experienced i guess. what i am trying to do is make a plugin field required. do i need to add it to function.php in the plugin? thanks

Default-user
iatown1 Purchased

never mind, figured it out. thanks

interconnectit

Really sorry for the late response, it goes in the functions.php. If you need any help at all with custom field implementations or validations I’m more than happy to provide examples.

There’s an update coming soon for better custom field support as well so stay tuned!

  • Bought between 100 and 499 items
  • Has been a member for 3-4 years
  • Referred between 1 and 9 users

Hello, great plugin, does this have also an option to force a minimum of characters in the description/content field?

interconnectit

Hi, you can add a custom validation rule to enforce that. For example in your functions.php add:

if ( function_exists( 'register_required_field' ) ) {

function check_title_length( $value, $postarr ) {
   return strlen( $value ) >= 20;
}

function check_content_length( $value, $postarr ) {
   return strlen( strip_tags( $value ) ) >= 200;
}

register_required_field( 'post_title', 'Title must be at least 20 characters long', 'check_title_length', array( 'post' ), '#titlediv' );

register_required_field( 'post_content', 'Your content must be at least 200 characters long', 'check_content_length', array( 'post' ), '#postdivrich' );

}
  • Bought between 10 and 49 items
  • Has been a member for 2-3 years

Hi there,

really great plugin to work with freelancers

interconnectit

Thanks! Hope it comes in handy for you some time

  • Bought between 1 and 9 items
  • Has been a member for 2-3 years
  • France

Hello,

Great plugin. Will you add some more rules (like minimum number of word for content, maximum number of words for title…)?

Thanks in advance for you answer

interconnectit

Hi, I can provide lots of examples for adding those custom rules in yourself but I see your point that it may be useful to have a lot more options to configure through the settings. I’ll gather some suggestions from my colleagues and other requests we’ve had in this comments and see what I can come up with :)

  • Bought between 1 and 9 items
  • Has been a member for 1-2 years

Hi there, I’ve just downloaded and installed this. When I tried to create a post, it threw this error:

” Warning: Missing argument 3 for required_fields::force_draft_meta() in /var/sites/t/*.com/public_html/wp-content/plugins/required-fields/required-fields.php on line 595 “

I’ve deactivated, just in case for now. The error message persisted at the top of the screen. Do you know what might be happening?

interconnectit

Hi, can you tell me which version of WordPress you’re using? They may have updated that filter in the new version so I’ll provide an update today if so. Sorry you’re having trouble.

Default-user

Hi there – many thanks for a quick response. We’re on 3.42 here.

interconnectit

Ok, I may have to revise the supported versions of WordPress since I made some updates for 3.8. I don’t know if it’s an option but upgrading WordPress will fix the issue.

In the meantime the warning won’t break anything but it should only show up when WordPress is in debug mode.

My colleague is working an the update at the moment so if we can add in backwards compatibility for 3.4.

Default-user

Hi there,

Upgrade isn’t really an option right now. The moment we upgrade, a lot of plugins are going to break – so that has to be part of a longer term, planned solution we’ll get to later this year.

Will this work if I re-enable it? Or does that warning suggest it won’t work in my version of WP at all?

I reckon that’s a good idea – it wouldn’t surprise me if there weren’t a lot of people still on this version.

James


by
by
by
by
by
by