Support

Account

Forum Replies Created

  • The word field_ was only an example.
    The correct names are json_data, age and name.

    // If they are how did you create them?

    I enter a name in the Field Label and ACF creates automatically the Field Name.

    The Field Type is text.
    The value looks like this:
    {"route_0":{"from":"Sit","to":"Sot","price":"45$"}}

  • So simple! Thank you very much!

  • Can you give me a little example please?

  • I got it.
    It is the “WPML Multilingual CMS”

    1) create a new field
    2) edit post and enter value in new field
    3) save/publish post

    -> only this field is not saved

    Workaround:
    I only deactivate and reactived the “WPML Multilingual CMS” plugin and everything works fine.

    Wordpress: 4.6
    WPML Multilingual CMS: Version 3.5.1.1
    Advanced Custom Fields PRO Version 5.4.2

  • Now it works everything fine.
    I only disabled all plugins (but not acf) and then a enabled all plugins.

    Why?

    My Plugins
    Advanced Custom Fields PRO
    Advanced Custom Fields: Image Crop Add-on
    BackupBuddy
    Contact Form 7
    TinyMCE Advanced
    WPML Multilingual CMS
    WPML Translation Management
    Yoast SEO

  • This reply has been marked as private.
  • Hi James,

    Could you please try to use acf_form() without any parameter?/blockquote>
    The same parameter works with the other theme, so this is not the problem.

    Could you please disable the JS scripts loaded by your theme?

    Same error.

    It must be something in my functions.php.

    I disabled now this ajax request, i think i don’t need it because i used my own save functions.

    Thank you very much for the fast help.

  • Hi James,
    thanks for the fast reply!

    i disabled all plugins -> same problem
    i changed the theme to twentyfifteen-> works
    i re-activated all plugins -> works

    so the problem is my custom-theme … but i have no idea where to start :/

  • This reply has been marked as private.
  • This reply has been marked as private.
  • This reply has been marked as private.
  • 21 days later and i think the solution with the true/false field will not work for me. I have over 200 fields and i don’t want to add for every field an extra true/false field.

    What i have:

    JS

    // ##### TEXT #####
    $("input[type='text'],textarea").change(function ()
    {
        // mark input field with red Border
        $(this).addClass('editNow');
    
        // STOP FLOODING
        if(typeof editNow_select_TM != 'undefined') { clearTimeout(editNow_select_TM) }
        editNow_select_TM = setTimeout(function() 
        { 
            var newDataObj = [];  
    
            // get all changed input fields            
            $('#setCardManager_allForms :input.editNow').each(function(e)
            {
                newDataObj.push({   setCardId: $('#setCardManager').data('setcardid'), 
                                    type : 'input',
                                    fieldId : this.id, 
                                    fieldValue : $(this).val() });                                
            }); 
    
            // save to DB
            updateSetCard('select',newDataObj);
    
            // clear Timeout
            delete editNow_select_TM;     
        },1500);
    });
    
    // ##### DROPDOWN #####
    $('#setCardManager_allForms select').change(function ()
    {
        // save to DB
        updateSetCard('select',({   setCardId: $('#setCardManager').data('setcardid'), 
                                    type : 'select',
                                    fieldId : this.id, 
                                    fieldValue : $(this).val() }));
    });    
    
    // ##### CheckBox #####
    $(':checkbox').change(function() 
    {
        // save to DB
        updateSetCard('select',({   setCardId: $('#setCardManager').data('setcardid'), 
                                    type : 'checkbox',
                                    fieldId : this.id, 
                                    fieldValue :this.checked }));
    }); 
    
    // ##### REPEATER FIELDS #####
    $(':checkbox').change(function() 
    {
       // hmmm, not so easy
    }); 

    PHP
    I created a copy from wp_postmeta with the name wp_postmeta_draft.

    The function updateSetCard() store the new values in this table.
    update_post_meta_draft(setCardOpt['setCardId'], setCardOpt['fieldId'], setCardOpt['fieldValue']);

    If the admin confirm

    update_field($selector, $value, $post_id);
    delete row from wp_postmeta_draft

    ACF is new for me so i’m not sure:
    – will this solution work with any problems?
    – did i forget something?

    Thanks in advance and sorry for the late reply.

  • Sorry i dont get it 🙁

    I add (for example) the true/false field to the user “about me” field.
    On the frontend i check if the field “about me” is true (approved) or false (disapproved)

    If true, i show the normal “about me” field.
    If false, … where do i get the old value?

  • Hi James,
    Thanks for the fast reply but your solution does not work.
    I think you don’t get it (i know, bad english, sry :/ ).

    # An user update fields (for example: City, Name, Age, About me Text)

    # Only the User see the changes, all other user (including the admin) see the “old” values.

    # The admin must confirm (on a custom Page in the ACP) the changes
    Age -> ok -> Update user Profile
    Name -> ok -> Update user Profile
    About me Text -> not ok -> sent email and delete entry

    I know that is a lot of work, but i need this feature.
    Thanks in advance!

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