• Resolved tgilber007

    (@tgilber007)


    
    add_filter('forminator_render_form_markup', function( $html, $form_fields, $form_type, $form_settings, $form_design, $render_id ) {
    		if ( is_user_logged_in() ) {	
                          $user_id            = get_current_user_id();
    		      $message            = __( 'Already Submitted' );	
    			//code
    
    			if ( contition = true ) {
    				return $message;
    			}
    		}
    
    		return $html;
    	}, 10,	6 );

    How to render the form for specific form ids

Viewing 1 replies (of 1 total)
  • Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @tgilber007

    I hope you are doing well.

    You can use the

    $form_settings['form_id']

    To control your code based on Form ID:

    <?php 
    
    add_filter('forminator_render_form_markup', function( $html, $form_fields, $form_type, $form_settings, $form_design, $render_id ) {
    
        print_r($form_settings['form_id']);
    
        if ( is_user_logged_in() ) {	
                      $user_id            = get_current_user_id();
              $message            = __( 'Already Submitted' );	
            //code
    
            if ( contition == true ) {
                return $message;
            }
        }
    
        return $html;
    }, 10,	6 );

    Best Regards
    Patrick Freitas

Viewing 1 replies (of 1 total)
  • The topic ‘Render form for specific ids’ is closed to new replies.