PHP code example of azuracast / azuraforms

1. Go to this page and download the library: Download azuracast/azuraforms 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/ */

    

azuracast / azuraforms example snippets



return [
    'method' => 'post',
    'elements' => [

        'username' => [
            'email',
            [
                'label' => 'E-mail Address',
                'class' => 'half-width',
                'spellcheck' => 'false',
                '  'submit',
            [
                'type' => 'submit',
                'label' => 'Log in',
                'class' => 'btn btn-lg btn-primary',
            ]
        ],
    ],
];


/** @var Psr\Http\Message\ServerRequestInterface $request */

$form_config = _config, $defaults);

if ($form->isValid($request)) {
    $data = $form->getValues();

    // Process your submission here...
}

echo $form->render();


return [
    // Use 'groups' to denote fieldsets
    'groups' => [

        'fieldset_name' => [
            'legend' => 'My Fieldset',
            'description' => 'The description of the fieldset.',
            'elements' => [

                // The key is the name of the element
                'field_foo' => [
                    'text', // The first item is the field type
                    [
                        // The second item contains configuration options and attributes
                        'label' => 'Foo',
                        'e,
            ],
        ],

    ]
];