Support

Account

Home Forums Front-end Issues Font end form conflict and acf.add_action issue

Solved

Font end form conflict and acf.add_action issue

  • Hi,

    I have two problems with the front end form.

    I’ve added a front end form on a page that is already loading a google map using api v3, the location field isn’t loading. Is there any way around this?

    Secondly, I’m trying to fire an event when a new row is added to a repeater field using…

    acf.add_action('ready append', function( ){

    I’m getting TypeError: acf.add_action is not a function

    I’ve tried including acf_form_head(); in various locations including above the doctype but it doesn’t seem to be working.

    any ideas?

  • This reply has been marked as private.
  • Okay, I’ve solved the map issue by removing my enqueued script and loading the api with ajax for my map.

    if( typeof google === 'undefined' )
            {
                jQuery.getScript('https://www.google.com/jsapi', function(){
                
                    google.load('maps', '3', { other_params: 'sensor=false& libraries=places', callback: function(){ 
    
    //map code goes here
    
        }});
                });
                
            }

    Would be great to have acf.add_action('ready append', function( ){ working though

  • well, for my purposes this worked to access appended fields…

    $(document).on('focus', 'input', function () {
                alert('field is selected');
    });

    So, both problems fixed!

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

You must be logged in to reply to this topic.