1. Go to this page and download the library: Download truecastdesign/welder 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/ */
<? $options = ['Select...'=>'', 'Display Value'=>'value', 'Display Value 2'=>'value2'];
<?=$F->email('name=field_name label="The Label" error="Please enter a valid email address!"');
$F = new Truecast\Welder; # does not need to be the same instance as the one used to build the form but can be.
if($F->validate('first_name=name email_address=email phone=clean message=to_email'=>'[email protected]', 'from_name'=>$values['name'], 'from_email'=>$values['email'], 'subject'=>'Contact from Website', 'type'=>'html'], ['name', 'email', 'phone', 'message']);
# take them to the thanks page
header("Location: /contact-us/thanks"); exit;
}