Title: codevelop's Replies | WordPress.org

---

# codevelop

  [  ](https://wordpress.org/support/users/codevelop/)

 *   [Profile](https://wordpress.org/support/users/codevelop/)
 *   [Topics Started](https://wordpress.org/support/users/codevelop/topics/)
 *   [Replies Created](https://wordpress.org/support/users/codevelop/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/codevelop/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/codevelop/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/codevelop/engagements/)
 *   [Favorites](https://wordpress.org/support/users/codevelop/favorites/)

 Search replies:

## Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Regenerate Thumbnails] 404](https://wordpress.org/support/topic/404-52/)
 *  [codevelop](https://wordpress.org/support/users/codevelop/)
 * (@codevelop)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/404-52/#post-10167136)
 * I had the same issue – turns out I was missing my .htaccess file. Hope this helps
   at least one other person 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Advanced Forms for ACF] Add a class (under Display Tab)](https://wordpress.org/support/topic/add-a-class-under-display-tab/)
 *  Thread Starter [codevelop](https://wordpress.org/support/users/codevelop/)
 * (@codevelop)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/add-a-class-under-display-tab/#post-9754833)
 * What’s the easiest way to share my code? I’m used to doing this through Github
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Advanced Custom Fields: reCAPTCHA Field] Disabled for logged in users](https://wordpress.org/support/topic/disabled-for-logged-in-users/)
 *  Thread Starter [codevelop](https://wordpress.org/support/users/codevelop/)
 * (@codevelop)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/disabled-for-logged-in-users/#post-9730284)
 * Thanks! If ever I get around to adding my plugin to WordPress.org, I’ll be sure
   to update the thread.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Advanced Custom Fields: reCAPTCHA Field] Disabled for logged in users](https://wordpress.org/support/topic/disabled-for-logged-in-users/)
 *  Thread Starter [codevelop](https://wordpress.org/support/users/codevelop/)
 * (@codevelop)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/disabled-for-logged-in-users/#post-9729413)
 * Having separate field groups works, but isn’t really a viable option
 * What I meant about the clone field, is that I explored the following idea before
   opening a ticket:
 * – Create a group of all fields minus the reCAPTCHA
    – Create another group with
   2 fields. One field a clone of the above field group (so as to include all of
   those fields, without needing to manage 2 sets of the same fields in parallel)
   and the other field being the reCAPTCHA.
 * In the end, I wrote a quick plugin that adds some field settings to any field:
   –
   show only for: (ignore / all logged in users / all logged out users / [select
   role(s)] – hide for: (ignore / all logged in users / all logged out users / [
   select role(s)]
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Advanced Forms for ACF] entry_saved hook](https://wordpress.org/support/topic/entry_saved-hook/)
 *  Thread Starter [codevelop](https://wordpress.org/support/users/codevelop/)
 * (@codevelop)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/entry_saved-hook/#post-9726962)
 *     ```
       /**
       	 * Create entry when form is submitted
       	 *
       	 * @since 1.0.0
       	 *
       	 */
       	function create_entry( $form ) {
   
       		// Make sure entries should be created
       		if ( ! $form['create_entries'] ) {
       			return;
       		}
   
       		// Create entry post
       		$post_data = array(
       			'post_type' 		=> 'af_entry',
       			'post_status' 		=> 'publish',
       			'post_title'		=> '',
       		);
   
       		$entry_id = wp_insert_post( $post_data );
   
       		if ( ! $entry_id ) {
       			return;
       		}
   
       		// Update post title
       		$updated_title_data = array(
       			'ID' 			=> $entry_id,
       			'post_title' 	=> sprintf( '#%s', $entry_id ),
       		);
   
       		wp_update_post( $updated_title_data );
   
       		// Save general entry info
       		update_post_meta( $entry_id, 'entry_form', $form['key'] );
       		update_post_meta( $entry_id, 'entry_submission_date', date( 'Y-m-d H:i:s' ) );
       		update_post_meta( $entry_id, 'entry_ip_address', $_SERVER['REMOTE_ADDR'] );
   
       		// Transfer all fields to the entry
       		af_save_all_fields( $entry_id );
   
       		// Save generated entry ID to submission object
       		AF()->submission['entry'] = $entry_id;
   
               apply_filters( 'af/form/entry', $entry_id );
               apply_filters( 'af/form/entry/id=' . $form['post_id'], $entry_id );
               apply_filters( 'af/form/entry/key=' . $form['key'], $entry_id );
   
       	}
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Advanced Forms for ACF] entry_saved hook](https://wordpress.org/support/topic/entry_saved-hook/)
 *  Thread Starter [codevelop](https://wordpress.org/support/users/codevelop/)
 * (@codevelop)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/entry_saved-hook/#post-9726945)
 * Correction, I think it would be best to hook into create_entry (not entry_saved)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Advanced Custom Fields: reCAPTCHA Field] Hook for construct?](https://wordpress.org/support/topic/hook-for-construct/)
 *  Thread Starter [codevelop](https://wordpress.org/support/users/codevelop/)
 * (@codevelop)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/hook-for-construct/#post-9726312)
 * I just realized it’s not so simple – since it’s in the constructor, the defaults
   get created before any chance to hook from one’s functions.php
 * I think the best way would be to add a settings page. I’ll work that out and 
   get back to you.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Advanced Custom Fields: reCAPTCHA Field] Disabled for logged in users](https://wordpress.org/support/topic/disabled-for-logged-in-users/)
 *  Thread Starter [codevelop](https://wordpress.org/support/users/codevelop/)
 * (@codevelop)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/disabled-for-logged-in-users/#post-9722737)
 * I’d tried the same thing as well (great minds think alike!) but it sounds like
   we came to the same discovery about the Clone field.
 * I totally see where you’re coming from about the slippery slope. I think a more
   versatile solution would actually be if, there were more Conditions for _fields_
   in the ACF core, including User Role.
 * Since my form is on the front, I’d want to use the “exclude” argument for acf_form–
   but it’s not the cleanest solution, plus I’m actually using Advanced Forms plugin
   for this set of fields, as it’s a contact form :/ The circumstances are making
   this tricky!
 * I realized my code modifications are not quite as complete as I thought… the 
   JS is throwing an error since the div with the corresponding ID is missing. I’ll
   see if I can advance this some more. On that note – it would actually be great
   if the JS / CSS dependencies only get loaded after verifying whether there’s 
   a form on the page that has a Captcha field. I noticed, at least the JS, is loaded
   on every page when the plugin is installed. Although, I guess once the script
   gets cached that no longer matters.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Advanced Custom Fields: reCAPTCHA Field] Disabled for logged in users](https://wordpress.org/support/topic/disabled-for-logged-in-users/)
 *  Thread Starter [codevelop](https://wordpress.org/support/users/codevelop/)
 * (@codevelop)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/disabled-for-logged-in-users/#post-9721973)
 * Thanks for the quick response.
 * The problem with my current use-case is that the only field in the entire group
   that I’d want to disable for logged-in users is the captcha field. I don’t want
   to create one set of fields for logged-in users, and other for logged out, where
   the only difference is that one captcha field.
 * I dabbled in the code and have managed to add this setting within the admin, 
   and have the field not appear if set to “true” and the user is logged in.
 * The only part that’s not quite right is that I’m still left with the label, which
   I end up needing to hide by adding a class to the field.
 * If you’re interested, I can share my work through github?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Advanced Forms for ACF] Can we style the submit button](https://wordpress.org/support/topic/can-we-style-the-submit-button/)
 *  [codevelop](https://wordpress.org/support/users/codevelop/)
 * (@codevelop)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/can-we-style-the-submit-button/#post-9721939)
 * I was about to ask the same in regards to adding a class to the form – which,
   by extension, would also allow you to customize the submit button.

Viewing 10 replies - 1 through 10 (of 10 total)