0

I have form when user can add achievement.

So it looks like:

<form action="{{ action('SettingsController@addAchievementsSettings') }}" method="post" class="form-horizontal">
                  {{ csrf_field() }}
  <div class="form-group">
  <label class="col-lg-2 control-label">Date</label>
  <div class="col-lg-6">
  <input type="date" placeholder=" " id="date-achievement" name="date_achievement" class="form-control">
   </div>
   </div>
   <div class="form-group">
   <label class="col-lg-2 control-label">What</label>
   <div class="col-lg-6">
   <input type="text" placeholder=" " id="what-achievement" name="what_achievement" class="form-control">
   </div>
   </div>
  <div class="form-group">
  <label class="col-lg-2 control-label">Description</label>
  <div class="col-lg-10">
  <textarea rows="10" cols="30" class="form-control" id="description_achievement" name="description_achievement"></textarea>
  </div>
  </div>
  <button type="button" class="btn btn-warning">Add one more...</button>
  <button type="submit" class="btn btn-success">Save</button>

I want to generate another form if somebody click Add one more. How can I reach this and how to add everything to database? Sorry guys for not more code but I do not have any idea

1
  • Are you asking for a tutorial on making forms interactive with JavaScript? If not, please make your question more specific. Commented Sep 21, 2017 at 20:08

2 Answers 2

1

from your question it seems a proper video / tutorial would help you more than just the answer. for generation I personally use laravelcollective/html. a good site with lots of videos explaining almost everything in regards to laravel and building sites with it I recomment the laracasts site. to learn how to build and process forms with laravel I suggest Laravel 5.4 from scratch

specifically for working with forms: Form request data and form validation

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

Comments

0

After creating your form and submitting your form , you have to validate your data then you will call your model to insert your date in database, i suggest you eloquent to handle database request if you are using laravel

Comments

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.