0

Is it possible to build a laravel application without using Blade to create the forms? I write the application's code, and my designer takes care of all the visual elements/css. He uses Dreamweaver and other software to generate the forms. Now is it possible for me to use these forms as they are, and still use Laravel's methodologies like routing?

The first place I'm stuck at is that I have a registration form, however it does not use blade and hence I am not entirely sure how to submit the form. Any help here is appreciated, I am here to learn!

Some sample code from the form itself -

<form data-abide>

<div class="row">
<div class="large-6 columns">
<label>First Name
<input type="text" name="first_name" placeholder="" pattern="alpha" maxlength="25" autofocus required />
</label>
</div>
<div class="large-6 columns">
<label>Last Name
<input type="text" name="last_name" placeholder="" pattern="alpha" maxlength="25" required />
</label>
</div>
</div><!-- .row -->

<div class="row">
<div class="large-12 columns">
<label>Choose your username
<input type="text" name="username" placeholder="Only letters, numbers and periods please!" pattern="^[a-zA-Z][a-zA-Z0-9\.]{3,20}$" maxlength="45" required />
</label>
<small class="error">You can only use letters, numbers and periods. Your username must have at least 4 characters.</small>
</div>
</div><!-- .row -->

<div class="row">
<div class="large-12 columns">
<button class="button" type="submit">Sign up</button>
</div>
</div><!-- .row -->

</form>

2 Answers 2

3

I personally do my forms myself, and fill it in with laravels data. Basically, you can submit the form to a controller like so:

URL::action('FooController@method');

Or if you have routing setup, you can use that too! Check out laravels docs on that! http://laravel.com/docs/routing

Sign up to request clarification or add additional context in comments.

Comments

0

Blade is just a template engine. You dont have to use it.

However you will realistically have to use PHP to create the forms, as you will need to dynamically insert variables, such as $id or routes.

If you want to use Laravel methodolgy like routing, you will need to do something like this

<?php URL::route('user.index') ?>

1 Comment

I've also seen Smarty as a plug-in replacement for Blade

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.