• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
Bagisto Forum

Bagisto

  • Register
  • Login
  • Search
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups

Do I have to use the CMS option to add a page ?

General Discussion
4
16
1.2k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M
    MattWithCurls last edited by MattWithCurls 24 Nov 2020, 08:41 24 Nov 2020, 08:40

    Hi @devansh-webkul I'm using the one from the repo.

    1 Reply Last reply Reply Quote 0
    • devansh-webkul
      devansh-webkul last edited by 25 Nov 2020, 10:56

      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.

      1 Reply Last reply Reply Quote 0
      • M
        MattWithCurls last edited by 28 Nov 2020, 18:45

        okay thanks @devansh-webkul will do that and get back to you.

        1 Reply Last reply Reply Quote 0
        • M
          MattWithCurls last edited by 4 Dec 2020, 11:50

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • V
            Vaishali Agarwal last edited by 5 Dec 2020, 14:50

            @MattWithCurls
            you just need to add this form source code in admin-> CMS-> add page

            once done, then go to the velocity-> meta -> footer middle content, here you need to pass the cms page url key.

            1 Reply Last reply Reply Quote 0
            • M
              MattWithCurls last edited by 7 Dec 2020, 12:05

              @Vaishali-Agarwal
              I inserted the contact us source code but when I want to edit it in the CMS option the page is blank.

              1 Reply Last reply Reply Quote 0
              • M
                MattWithCurls last edited by 7 Dec 2020, 12:18

                I figured it out 👍. Just deleted the source code from the database.

                1 Reply Last reply Reply Quote 0
                • M
                  MattWithCurls last edited by 7 Dec 2020, 12:30

                  @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>```
                  1 Reply Last reply Reply Quote 0
                  • R
                    rahul last edited by 7 Dec 2020, 13:34

                    Hi @MattWithCurls

                    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

                    1 Reply Last reply Reply Quote 0
                    • M
                      MattWithCurls last edited by 7 Dec 2020, 13:44

                      Thanks @rahul

                      1 Reply Last reply Reply Quote 0
                      • M
                        MattWithCurls last edited by 7 Dec 2020, 13:52

                        @rahul
                        So whats wrong with using the one i posted.

                        1 Reply Last reply Reply Quote 0
                        15 out of 16
                        • First post
                          15/16
                          Last post