| Server IP : 104.21.74.147 / Your IP : 216.73.217.154 Web Server : nginx/1.24.0 System : Linux wordpress-sites 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64 User : www-data ( 33) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/rebeccaone.com/wp-content/plugins/weforms/includes/templates/ |
Upload File : |
<?php
/**
* Contact form template
*/
class WeForms_Template_Contact extends WeForms_Form_Template {
public function __construct() {
parent::__construct();
$this->enabled = true;
$this->title = __( 'Contact Form', 'weforms' );
$this->description = __( 'Create a simple contact form for your site.', 'weforms' );
$this->image = WEFORMS_ASSET_URI . '/images/form-template/contact.png';
$this->category = 'default';
}
/**
* Get the form fields
*
* @return array
*/
public function get_form_fields() {
$all_fields = $this->get_available_fields();
$form_fields = [
array_merge( $all_fields['name_field']->get_field_props(), [
'required' => 'yes',
'name' => 'name',
] ),
array_merge( $all_fields['email_address']->get_field_props(), [
'required' => 'yes',
'name' => 'email',
] ),
array_merge( $all_fields['textarea_field']->get_field_props(), [
'required' => 'yes',
'label' => __( 'Message', 'weforms' ),
'name' => 'message',
] ),
];
return $form_fields;
}
}