Support

Account

Home Forums Front-end Issues Front-end form not saving data in backend fields

Unread

Front-end form not saving data in backend fields

  • Hi there, i’m using the acf_form() to get some custom field in a create new post page(this page isn’t from ACF), the issue is that i can’t save the fields, so can’t saving the fields I can not even use get_field() dynamically in other pages.
    My code in the new post page

     <div class="card-header">
        <?php 
    
              acf_form();
    
              $telaio = get_field('vin');
    
              update_field( 'vin' , $telaio);
    
              $marca = get_field('marca');
    
              update_field('marca', $marca);
                                    ?>
                                </div> 

    My code in the page where i want to display fields values

    <p class="informazioni-agg"> <?php echo get_field("vin"); ?>
    
     <p class="informazioni-agg"> <?php echo get_field("marca"); ?>
    

    Any solutions?
    ps: initially this code kinda worked, but echo get_field() always dsplaying “0” i thought because not getting value from frontend but from backend so nothing set and came out 0.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.