Do I have to use the CMS option to add a page ?
-
Hi @devansh-webkul I'm using the one from the repo.
-
Hi @MattWithCurls,
If you are good too with the packages then you can place your routes and other stuff in velocity otherwise if you want to keep them separate you can place it in the default Laravel app as well.
It's your choice.
-
okay thanks @devansh-webkul will do that and get back to you.
-
This post is deleted! -
@MattWithCurls
you just need to add this form source code in admin-> CMS-> add pageonce done, then go to the velocity-> meta -> footer middle content, here you need to pass the cms page url key.
-
@Vaishali-Agarwal
I inserted the contact us source code but when I want to edit it in the CMS option the page is blank. -
I figured it out . Just deleted the source code from the database.
-
@Vaishali-Agarwal can i insert this type of source in cms for that form.
<!DOCTYPE html> <html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Laravel</title> <!-- Bootstrap CSS --> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="{{ asset('css/style.css') }}"> </head> <body> <div class="container mt-5"> <!-- Success message --> @if(Session::has('success')) <div class="alert alert-success"> {{Session::get('success')}} </div> @endif <form action="" method="post" action="{{ route('contact.store') }}"> @csrf <div class="form-group"> <label>First Name</label> <input type="text" class="form-control {{ $errors->has('first_name') ? 'error' : '' }}" name="first_name" id="first_name"> <!-- Error --> @if ($errors->has('first_name')) <div class="error"> {{ $errors->first('first_name') }} </div> @endif </div> <div class="form-group"> <label>Last Name</label> <input type="text" class="form-control {{ $errors->has('last_name') ? 'error' : '' }}" name="last_name" id="last_name"> <!-- Error --> @if ($errors->has('last_name')) <div class="error"> {{ $errors->first('last_name') }} </div> @endif </div> <div class="form-group"> <label>Email</label> <input type="email" class="form-control {{ $errors->has('email') ? 'error' : '' }}" name="email" id="email"> @if ($errors->has('email')) <div class="error"> {{ $errors->first('email') }} </div> @endif </div> <div class="form-group"> <label>Phone</label> <input type="text" class="form-control {{ $errors->has('phone') ? 'error' : '' }}" name="phone" id="phone"> @if ($errors->has('phone')) <div class="error"> {{ $errors->first('phone') }} </div> @endif </div> <div class="form-group"> <label>Subject</label> <input type="text" class="form-control {{ $errors->has('subject') ? 'error' : '' }}" name="subject" id="subject"> @if ($errors->has('subject')) <div class="error"> {{ $errors->first('subject') }} </div> @endif </div> <div class="form-group"> <label>Message</label> <textarea class="form-control {{ $errors->has('message') ? 'error' : '' }}" name="message" id="message" rows="4"></textarea> @if ($errors->has('message')) <div class="error"> {{ $errors->first('message') }} </div> @endif </div> <input type="submit" name="send" value="Submit" class="btn btn-dark btn-block"> </form> </div> </body> </html>```
-
Please insert as given below -
<form action="" method="POST"> @csrf <div class="form-container"> <div class="control-group" :class="[errors.has('location') ? 'has-error' : '']"> <label for="location" class="required">Zip Code</label> <input type="text" v-validate="'required'" class="control" name="location" /> <span class="control-error" v-if="errors.has('location')">Above field is required</span> </div> <button type="submit" class="btn btn-lg btn-primary" style="margin-top: 20px;"> submit </button> </div> </form>
and in admin like this - https://prnt.sc/vxij7d
Thanks
Rahul Shukla -
Thanks @rahul
-
@rahul
So whats wrong with using the one i posted.