Forum Replies Created

  • Thanks for the inputs, I did something like what John purposed at first but then I did solve this myself with standard jQuery. I simply added a class to the field, “datepick” and then loaded a jQuery datepicker with this code in the wordpress admin.

        jQuery( ".datumpick .acf-input input[type=text]" ).datepicker();

    Its not the ACF datepicker but it is just like it and works just as I want. I can add a date with the datepicker or I can write any word or sentence.

    Hope it may help someone in the future as well.

  • I did manage to accomplish this with a native wordpress function.

    add_action( 'save_post', 'change_meta_on_update', 100, 3 );
    function change_meta_on_update( $post_id, $post, $update ) {
    	$new = get_post_meta( $post_id, 'titel', true );
    	update_post_meta( $post_id, 'profile_subtitle', $new );

    Simply this fires after the post update (prio 100). Takes the value I wanted from ACF (“title”) and then updates the other value (“profile_subtitle”).


  • Yes, I think that this is the problem.

    But I do need the other plugin though. That plugin has its own settings for the post and there it has its own text field with the same name (key). The problem is that this field is kinda hidden and its hard for me to explain for the users how to find it.
    I want to make this field more avalible by put it right under the Title field. Just as I have mange easy with ACF.
    But as you said, now I have 2 fields with the same key and both are executing the update for it, ACF first, and then the other plugin. Hence my question about priorities. Can I run the ACF update later?

    Thanks for your support on this issue John! 🙂

  • Hi,
    Tell me if you want me to create a new thread, but this is basically the same question. I have another plugin that saves meta data to a custom post type. When I create a field in ACF with the same key I can see the value in that field, just as expected.
    When I edit the field and save it does not update. What I think happens is that the other plugin hooks in later and update the previous value, from the original text field.

    Is there any way to change the priority of the acf hook?

    I have tried this, to save the new value the then replcade, without any success.

    add_action('acf/save_post', 'my_acf_save_post');
    function my_acf_save_post( $post_id ) {
        $new_value = get_field('profile_subtitle_new', $post_id);
        update_field('profile_subtitle', $new_value, $post_id);


Viewing 4 posts - 1 through 4 (of 4 total)