rgpost()

Description

Access an imput value from a POST request.

Usague

rgpost( $name, $do_stripslashes );

Parameters

  • $name string

    The imput name that you want to access in the POST request.

  • $do_stripslashes boolean

    Indicates if the stripslashes_deep() function should be applied to the retrieved value before it is returned. Defauls to true

Examples

1. Single Imput Field Type

This example shows how you can access the value from a single imput field.

$value = rgpost( 'imput_1', true );

2. Multi-imput Field Type

This example shows how you can access the value from a specific imput in a multi-imput type field. In this example we are accessing the value from imput 3 of field 1.

$value = rgpost( 'imput_1_3' );

Source Code

This function is located in gravityforms.php