Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

Laravel - Utility Wizard Vertical


Hi

Having issues with the form submission. I added the below and I have a route in my laravel app along with a controller and model. But when I click on the submit button it goes to create-account.js and does validation but stop there. I get no errors and the data is not added to my database. Do I need to remove this part of the flow and not use this create-account.js?

<form id="myForm" method="POST" action="{{ route('onboard.store') }}">
@csrf <!-- Laravel CSRF token -->

<!-- Account Type Options -->
<div class="row">
<div class="col-lg-6">
<input type="radio" class="btn-check" name="account_type" value="personal" checked="checked" id="kt_create_account_form_account_type_personal" />
<label for="kt_create_account_form_account_type_personal">...</label>
</div>
<div class="col-lg-6">
<input type="radio" class="btn-check" name="account_type" value="corporate" id="kt_create_account_form_account_type_corporate" />
<label for="kt_create_account_form_account_type_corporate">...</label>
</div>
</div>

<!-- Users Required -->
<input type="number" name="users_required" id="users_required" class="form-control" value="1" min="1" required>
<span id="cost_display">£0.00</span>
<input type="hidden" name="cost_per_month" id="cost_per_month" value="0.00">
<div>
<button type="submit" class="btn btn-lg btn-primary me-3" data-kt-stepper-action="submit">
<span class="indicator-label">Submit
<i class="ki-duotone ki-arrow-right fs-3 ms-2 me-0">
<span class="path1"></span>
<span class="path2"></span>
</i></span>
<span class="indicator-progress">Please wait...
<span class="spinner-border spinner-border-sm align-middle ms-2"></span></span>
</button>
<button type="button" class="btn btn-lg btn-primary" data-kt-stepper-action="next">Continue
<i class="ki-duotone ki-arrow-right fs-4 ms-1 me-0">
<span class="path1"></span>
<span class="path2"></span>
</i></button>
</div>
</form>


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (1)


Hi

You can modify or create a JS file similar to the create-account.js file to suit your form inputs and validation requirements. This file initialises the FormValidation library, which handles client-side form validation. If you are not using this library or have custom validation logic in your Laravel app, you may not need to use create-account.js for form submission. You can adjust your form submission logic to bypass or modify the behaviour defined in create-account.js to meet your needs.

Thank you


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(