Support

Account

Home Forums Front-end Issues How to make a shape at the front with _acf_screen value post?

Solving

How to make a shape at the front with _acf_screen value post?

  • Hello, please tell me how to make such a form at the front:

    
    <div id="acf-form-data" class="acf-hidden">
    <input type="hidden" id="_acf_screen" name="_acf_screen" value="post">
    <input type="hidden" id="_acf_post_id" name="_acf_post_id" value="694">
    <input type="hidden" id="_acf_validation" name="_acf_validation" value="1">
    <input type="hidden" id="_acf_nonce" name="_acf_nonce" value="0135d4e496">
    <input type="hidden" id="_acf_changed" name="_acf_changed" value="0">
    </div>
    

    I use this:

    
    acf_form(array(
    'post_id' => $id,          
    'form' => false					
    ));
    

    but it gives out not what I expect:

    
    <div id="acf-form-data" class="acf-hidden">
    <input type="hidden" id="_acf_screen" name="_acf_screen" value="acf_form">
    <input type="hidden" id="_acf_post_id" name="_acf_post_id" value="694">
    <input type="hidden" id="_acf_validation" name="_acf_validation" value="1">
    <input type="hidden" id="_acf_form" name="_acf_form" value="Q2x0TjlxeUJEbTYyc3VJTWRwQTI1M0xlYk5TOUI3RXFFVXNnaGo0bTl4OGE1b3BhVHYzM2ZlcHVsSGJLbmY5RE5NK0RmMEZocW9adEdxbGdpN2RsV05ubUc3MjJLa1dEZ2R2ZzBPQzRPUTN3N28xTWRzRFdzUUwwMkljZGMrZGJwSHVXTXVwZmRsKzc1d1NtUk90SmhpMkoyMC9BY3FlRXMyTzhMMjJrUXlJMWw3Ykd4UFA3eDZhVzVUaDdtckMxajZyL04zSDByL2ZVRTliMDA2VkZ6VktGSFpldjl5NDdwVG9PZVlJbWlyTjhzWTF5bDJSSmJiMXlPUWtvOHhxRGVVUDRvRmV1Rit4Z2lyanpKbVh1bjYwcWIyQ25tZHVNUzZ4VXBrL09yWWtWMzQ0b21TT3pxbFZieURrTkx5eGQwSWY3ZWhNejVSTnhDNmQvYmg5M0twL3FVQUM3Y1pHTjJSK09ZTDl6Ulp1TmhManV0VThYbEs5bzNXcXpxVi9LQ2hqYlNwSlR1WFZwN25tb2NMVDZoWWh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dqBdHyl9mpY=">
    <input type="hidden" id="_acf_nonce" name="_acf_nonce" value="7688cc0b88">
    <input type="hidden" id="_acf_changed" name="_acf_changed" value="0">
    </div>
    

    how can I get this form at the front?

    
    <div id=”acf-form-data” class=”acf-hidden”>
    <input type=”hidden” id=”_acf_screen” name=”_acf_screen” value=”post”>
    <input type=”hidden” id=”_acf_post_id” name=”_acf_post_id” value=”694″>
    <input type=”hidden” id=”_acf_validation” name=”_acf_validation” value=”1″>
    <input type=”hidden” id=”_acf_nonce” name=”_acf_nonce” value=”0135d4e496″>
    <input type=”hidden” id=”_acf_changed” name=”_acf_changed” value=”0″>
    </div>
    
  • You cannot. The field “_acf_screeen” tells ACF where the form is being shown. In the first case it is the post edit page and in the second it is a form on the front end of the site shown using acf_form().

    For what purpose are you trying to use this hidden form value?

  • I update my notes from the front with REST API using POST query, by sending data like this in a request:

    
    {
    data: {
        '_acf_nonce': acf_nonce_field, // here is the value of the input from the field
        'title': title_form,
        'content': content_form,
        'status': status_doc,
        'fields': {
            'version': ver,                    
        }
    

    if the field _acf_nonce is missing, then the post will be updated but the acf field is not updated 🙁 in my case this is the field version

    if you match the value that I take from wp/admin/post.php, then the version field will be updated! but how do i get it 🙁

    
    <div id=”acf-form-data” class=”acf-hidden”>
    <input type=”hidden” id=”_acf_screen” name=”_acf_screen” value=”post”>
    <input type=”hidden” id=”_acf_post_id” name=”_acf_post_id” value=”694″>
    <input type=”hidden” id=”_acf_validation” name=”_acf_validation” value=”1″>
    <input type=”hidden” id=”_acf_nonce” name=”_acf_nonce” value=”0135d4e496″>
    <input type=”hidden” id=”_acf_changed” name=”_acf_changed” value=”0″>
    </div>
    
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.