Support

Account

Forum Replies Created

  • This is the code for one of my forms. Each form has its own shortcode

    add_shortcode( 'ibsc_scp_stage2', 'scp_stage2' );
    function scp_stage2() {
    
      //retrieve scp-id from URL
      if ( isset( $_GET['scp-id'] ) ) {
        $scp_id = sanitize_text_field( $_GET['scp-id'] );
      } //end if
    
      //assemble $form_config array  
      $form_config = array(
        'post_id' => $scp_id,
        'new_post' => false,
        'post_title' => false,  
        'form' => true,
        'field_groups' => array(),  //blank     
        'fields' => array(
           'field_683c1e59136a4', //scp_sch_nam - tx
           'field_683c1ed529a74', //scp_pho_typ - tx  
        ), //end of fields array
        'submit_value'  => __('Update Taxonomies'),  
      );  //end of form_config array
      
      //process acf form
      ob_start();
      acf_form($form_config);
      $ob = ob_get_clean();
     return $ob; 
    
    } //end function
Viewing 1 post (of 1 total)