Title: af_save_field with value
Last modified: June 3, 2018

---

# af_save_field with value

 *  Resolved [ash6789](https://wordpress.org/support/users/ash6789/)
 * (@ash6789)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/af_save_field-with-value/)
 * Hii
 * I am facig an issue
 * this function af_save_field saves the values
 * and it is used af_save_field(‘year’, $post_id);
 * what if I want to assign values manually like
    $year = 1990;
 * How I can do this?
    af_save_field(‘year’, $post_id);

Viewing 1 replies (of 1 total)

 *  Plugin Author [fabianlindfors](https://wordpress.org/support/users/fabianlindfors/)
 * (@fabianlindfors)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/af_save_field-with-value/#post-10364885)
 * Hi! `af_save_field` is used to automatically transfer a field value from a form
   to a post/user. If you simply want to save a static value or perform some changes
   before saving you can use the regular ACF `update_field`. Something like this:
 *     ```
       $year = 1990;
       update_field( 'field_key', $year, $post_id );
       ```
   
 * ACF recommends using the field key instead of the field name for update_field
   if the post is new. Check out the documentation [here](https://www.advancedcustomfields.com/resources/update_field/).
 * Hope this helps!
    -  This reply was modified 8 years, 4 months ago by [fabianlindfors](https://wordpress.org/support/users/fabianlindfors/).

Viewing 1 replies (of 1 total)

 The topic ‘af_save_field with value’ is closed to new replies.

 * ![](https://ps.w.org/advanced-forms/assets/icon-256x256.png?rev=1894254)
 * [Advanced Forms for ACF](https://wordpress.org/plugins/advanced-forms/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-forms/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-forms/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-forms/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-forms/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-forms/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [fabianlindfors](https://wordpress.org/support/users/fabianlindfors/)
 * Last activity: [8 years, 4 months ago](https://wordpress.org/support/topic/af_save_field-with-value/#post-10364885)
 * Status: resolved