so you dont submit any changes on this form?
May 8, 2020
5
Level 9
How to Disable a href after submit until action is complete
I am using "a href" as a button in my Laravel-5.8 project:
<form action="{{route('hr.departments.store')}}" method="post" class="form-horizontal" enctype="multipart/form-data">
{{csrf_field()}}
<div class="card-body">
<div class="form-body">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label>Department Name<span style="color:red;">*</span></label>
<input type="text" name="dept_name" placeholder="Enter department name here" class="form-control" value="{{old('dept_name')}}">
</div>
</div>
</div>
</div>
</div>
<!-- /.card-body -->
<div class="card-footer">
<a href ="{{ route('post.publish.all')}}" class="btn btn-success float-left"><i class="fas fa-arrow-right"></i> Publish</a>
<button type="submit" class="btn btn-primary">Save</button>
</div>
</form>
Since this is not a button, I want to disable:
<a href ="{{ route('post.publish.all')}}" class="btn btn-success float-left"><i class="fas fa-arrow-right"></i> Publish</a>
after it is clicked untill the action is complete.
How do I achieve this?
Thank you.
Please or to participate in this conversation.