{!! PageBuilder::block($block_name, $options) !!}
ie. {!! PageBuilder::block('contact_form') !!}
'
'files' => false (default: true, accept file inputs)
'id' => 'contact-form' (default: form[block_id], can set the id of the form)
uses
/blocks/forms/[form_template].blade.php
form_template can be set in the admin when editing the form's settings
The following variables contain data set in the admin and can be used in the form template
$form_data->email_from (string)
$form_data->email_to (string)
$form_data->template (string - template name without the .blade.php)
$form_data->page_to (int - page id)
$form_data->captcha (bool)
Creating forms in Coaster is refreshingly easy, they can be as complex or simple as you like and
<h3>Contact Form:</h3>
<div class="form-group {!! FormMessage::get_class('email') !!}">
{!! Form::text('email', Request::get('email'), array('class' => 'form-control', 'placeholder' => 'Enter your email')) !!}
<span class="help-block">{!! FormMessage::get_message('email') !!}</span>
</div>
<div class="form-group {!! FormMessage::get_class('name') !!}">
{!! Form::text('name', Request::get('name'), array('class' => 'form-control', 'placeholder' => 'Enter your Name')) !!}
<span class="help-block">{!! FormMessage::get_message('name') !!}</span>
</div>
<div class="form-group {!! FormMessage::get_class('message') !!}">
{!! Form::textarea('message', Request::get('message'), array('rows' => 3, 'class' => 'form-control', 'placeholder' => 'Your Message ...')) !!}
<span class="help-block">{!! FormMessage::get_message('message') !!}</span>
</div>
@if ($form_data->captcha)
<div class="form-group {!! FormMessage::get_class('captcha_code') !!}">
<div class="clearfix"></div>
<div class="pull-left">
<img id="captcha" src="{!! URL::to('packages/webfeet/cms/securimage/securimage_show.php') !!}" alt="CAPTCHA Image" />
</div>
<div class="pull-left" style="padding-left: 20px">
<a href="#" onclick="document.getElementById('captcha').src = '{!! URL::to('packages/webfeet/cms/securimage/securimage_show.php') !!}?' + Math.random(); return false">[ Refresh Captcha ]</a>
<object type="application/x-shockwave-flash" data="{!! URL::to('packages/webfeet/cms/securimage/securimage_play.swf') !!}?audio_file={!! URL::to('/packages/webfeet/cms/securimage/securimage_play.php') !!}" width="19" height="19">
<param name="movie" value="{!! URL::to('packages/webfeet/cms/securimage/securimage_play.swf') !!}?audio_file={!! URL::to('/packages/webfeet/cms/securimage/securimage_play.php') !!}&bgColor1=#fff&bgColor2=#fff&iconColor=#777&borderWidth=1&borderColor=#000" />
</object>
<p><input id="captcha_code" class="form-control" type="text" name="captcha_code" size="10" maxlength="6" style="width:100px" /> <span class="help-block">{!! FormMessage::get_message('captcha_code') !!}</span></p>
</div>
</div>
@endif
<div class="control-group">
<div class="controls">
{!! Form::submit('Submit', array('class' => 'btn btn-default')) !!}
</div>
</div>
Forms in Coaster use the form functions by Laravel
{!! Form::text('text', Request::get('text')) !!}
Coaster gives you the option of enabling captcha code submissions on an individual basis for each one of your forms. This functionality is entirely optional and you can choose to not allow the functionality on your form by removing $form_data->captcha conditional. If however, you wish to retain this functionality you must ensure the HTML surrounding it is supported within your theme or else once enabled it may break your design. The captcha input must be named captcha_code.
In the theme admin section, you can manage select fields via the "Manage form input validation rules" link. In order to add validation rules for any of your forms, you just need to add the form name, field name, and rules into this table.
For example, add 'email with the rules email|required' to the table in the manage rules section and any form with an input named 'email' will require and validate that email address.
The validation rules are based on the format of Laravel's
Based on Laravel 5
Additional features always being planned/researched
"git" involved
Announcing (belatedly) Coaster CMS version 5.5...
So, somewhat belatedly we have launched Coaster CMS version 5.5, which is now based on Laravel v5.5 (LTS) and mostly includes a major "under the hood" update that will make Coaster more stable and als...
Coaster CMS v5.4 is here
So, Coaster CMS v5.4 has arrived and I'm just going to give you an overview of the new features. We think this update will really help people grasp the concepts around Coaster and give you ideas o...
Where is Data Stored in Coaster CMS
We've had a couple of discussions recently with people trying to understand the data structure of Coaster and more specifically, where data is stored in Coaster CMS and I thought I'd summarise some of...