PHP code example of fuelviews / laravel-forms
1. Go to this page and download the library: Download fuelviews/laravel-forms 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/ */
fuelviews / laravel-forms example snippets
return [
'forms' => [
'free_estimate' => [
'production_url' => 'https://fuelforms.com/api/f/',
'development_url' => 'https://dev.fuelforms.com/api/f/',
],
'contact_us' => [
'production_url' => 'https://fuelforms.com/api/f/',
'development_url' => 'https://dev.fuelforms.com/api/f/',
],
'careers' => [
'production_url' => 'https://fuelforms.com/api/f/',
'development_url' => 'https://dev.fuelforms.com/api/f/',
],
],
'modal' => [
'title' => 'Your Project Info',
'form_key' => 'free_estimate',
'steps' => [
1 => [
'heading' => 'Where do you need painting?',
'locations' => [
'inside',
'outside',
'cabinets',
],
],
],
'tos' => [
'enabled' => true,
'content' => 'By clicking "Submit" above, I expressly consent to...',
],
'optional_div' => [
'enabled' => true,
'title' => 'Looking to work with us?',
'link_text' => 'Apply Here',
'link_route' => 'welcome',
],
],
'validation' => [
'default' => [
'firstName' => ''yelp' => 'https://yelp.com',
'bbb' => 'https://bbb.org',
],
];
<form method="POST" action="{{ route('forms.validate') }}">
<input type="text" name="isSpam" style="display:none" />
/* Form fields here */
<x-forms::meta />
<input type="hidden" name="form_key" value="contact_us" />
<input type="text" name="gotcha" class="hidden" />
<x-forms::buttons.fake-button :buttonText="'Submit'" />
<x-forms::buttons.submit-button :buttonText="'Submit'" />
</form>
<button onclick="Livewire.dispatch('openModal')">Show Modal</button>
@livewire('forms-modal')
bash
php artisan forms:install
bash
php artisan vendor:publish --tag="forms-config"
bash
php artisan vendor:publish --tag="forms-views"
layouts.app.blade.php
config/forms.php
javascript
content: [
'./vendor/fuelviews/laravel-forms/resources/**/*.php'
]