Support

Account

Forum Replies Created

  • I have modified form-edit-account.php with this script:

    <!-- Campi aggiuntivi -->
    <b><a href="edit-account">INFORMAZIONI AGGIUNTIVE</a></b>
    <?php acf_form_head(); ?>
    
    <?php
    $current_user_id = get_current_user_id();
        $options = array(
                    'post_id' => 'user_'.$current_user_id,
                    'fields' => array('piva','coduni','codfis','pec','datanas','cittanas','pronas','rdm','fax'),
                    'form' => true,
                    'instruction_placement' => 'label',
    				'submit_value' => __("SALVA INFORMAZIONI AGGIUNTIVE", 'acf'),
                );
        acf_form($options);
    ?>
    <!-- /Campi aggiuntivi -->

    In te “array” I have insert the name of my custom fields.

  • This is the script I use:

    <?php acf_form_head(); ?>
    <?php get_header(); ?>
    <?php  the_field('codfis', 'pec', 'user_'.$user->ID); ?>
    <?php
        $options = array(
                    'post_id' => 'user_'.$user->ID,
                    'fields' => array('codfis', 'pec'),
                    'form' => false,
                    'instruction_placement' => 'field',
                );
        acf_form($options);
    ?>

    codfis and pec are the two custom fields.
    this is how is shown:
    https://www.infomyweb.com/erroracf.jpg

  • costicanu I’ve got the same problem Have you solved?

    bosoxbill I explain the problem.

    the script show the custom fields. But when you press “Save” the data is not saved.
    But if is an error (like a mandatory field) then it save.

    I think some code have to be not just in form-edit-account.php but somwhaere else.

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