PHP code example of pinkcrab / form_fields

1. Go to this page and download the library: Download pinkcrab/form_fields library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

pinkcrab / form_fields example snippets


Input_Text::create( 'my_input' )
    ->current( get_option( 'my_option', 'fallback' ) )
    ->render();

Input_Text::create( 'my_input' )
    ->current( MyData::getOption( 'my_option', 'fallback' ) )
    ->as_string();

Input_Text::create('test')->render()    // Prints the input
Input_Text::create('test')->as_string() // Returns as HTML string.

Input_Text::create('name')->render();
Input_Email::create('email')->render();
Input_Password::create('password')->render();