Is this the form that comes up?

|
Akshay Bhardwaj 2020-02-25 12:12:56
Running on local host
skys215 2020-02-25 12:13:56
why they are calling port 49678?
Akshay Bhardwaj 2020-02-25 12:15:25
Don’t know
Akshay Bhardwaj 2020-02-25 12:15:44
Initially called 8000
skys215 2020-02-25 12:16:31
when it appears?
Akshay Bhardwaj 2020-02-25 12:20:19
Not
Akshay Bhardwaj 2020-02-25 12:20:33
Givingi issue same
Z_Yamin 2020-02-25 12:20:41
$(‘#editModal’).on(‘show.bs.modal’,function (event) {
let button = $(event.relatedTarget);
let system_name = button.data(“systemName”);
let system_type = button.data(“systemType”);
let system_id = button.data(“systemID”);
alert(system_name)
let modal = $(this);
modal.find(‘.modal-body t#system_name’).val(system_name);
modal.find(‘.modal-body> system_type’).val(system_type);
modal.find(‘.modal-body> #system_id’).val(system_id);
})
what is the problem whit this code
Z_Yamin 2020-02-25 12:20:57
i alert undefinde
Akshay Bhardwaj 2020-02-25 12:21:17
Akshay Bhardwaj 2020-02-25 12:20:33
Givingi issue same

Not getting point

harmlez_prinz 2020-02-25 12:23:15
skys215 2020-02-25 11:38:21
use with() function
$user = User::with([‘designation’,’department])->get()

Thanks, resolved

harmlez_prinz 2020-02-25 12:25:49
Z_Yamin 2020-02-25 12:20:41
$(‘#editModal’).on(‘show.bs.modal’,function (event) {
let button = $(event.relatedTarget);
let system_name = button.data(“systemName”);
let system_type = button.data(“systemType”);
let system_id = button.data(“systemID”);
alert(system_name)
let modal = $(this);
modal.find(‘.modal-body t#system_name’).val(system_name);
modal.find(‘.modal-body> system_type’).val(system_type);
modal.find(‘.modal-body> #system_id’).val(system_id);
})
what is the problem whit this code

check ur 8th line “t#system”

harmlez_prinz 2020-02-25 12:26:28
what is the purpose of “>”?
Z_Yamin 2020-02-25 12:26:40
harmlez_prinz 2020-02-25 12:25:49
check ur 8th line “t#system”

if you check the alert is befor that so it not related to that

harmlez_prinz 2020-02-25 12:28:46
try to console.log(system_name); see the error u getting
harmlez_prinz 2020-02-25 12:29:18
comment the other part of the code for now
Z_Yamin 2020-02-25 12:30:17
the result of console.loge is undefinde
Z_Yamin 2020-02-25 12:30:30
i commented other codes
harmlez_prinz 2020-02-25 12:30:37
can i see your html?
Z_Yamin 2020-02-25 12:30:55
ok just a second pleas
Z_Yamin 2020-02-25 12:31:28
this is the button:
Z_Yamin 2020-02-25 12:31:52
@foreach($system as $s)

<tr>
<td>{{$s->system_id}}</td>
<td>{{$s->system_name}}</td>
<td>{{$s->type}}</td>

<td colspan=”2″ id=”operations”>
<a href=”javascript:if(confirm(‘Are you want to delete this record?’))ajaxDelete(‘{{route(‘system.delete’,$s->system_id)}}’,'{{csrf_token()}}’)”><i class=” glyphicon glyphicon-trash btn btn-danger btn-sm” ></i></a>
<button data-toggle=”modal” data-target=”#editModal” class=”glyphicon glyphicon-edit btn btn-primary btn-sm”
data-systemName=”{{$s->system_name}}” data-systemType=”{{$s->type}}” data-systemID=”{{$s->system_id}}”>

</button>
</td>

</tr>

@endforeach

Z_Yamin 2020-02-25 12:32:45
<form method=”post” id=”frm” action=”{{route(‘system.update’,[$system])}}” name=”payment_form”>
{{csrf_field()}}
<div class=”modal-body” style=”margin-bottom: 50px;”>
<div class=”row”>
<div class=”col-md-6″>
<div class=”form-group required” id=”form-system_name-error”>
<label for=”system_name”>نام سیستم</label>
<input type=”text” class=”form-control required” id=”system_name” name=”system_name”>
<span id=”system_name-error” class=”help-block”></span>
</div>
</div>
<div class=”col-md-6″>
<div class=”form-group required” id=”form-system_type-error”>
<label for=”system_type”>نوع سیستم</label>
<input type=”text” class=”form-control required” id=”system_type” name=”system_type”>
<span id=”system_type-error” class=”help-block”></span>
</div>
</div>
<input type=”hidden” id=”system_id” name=”system_id”>
</div>

</div>
<div class=”modal-footer”>
<div class=”form-group col-md-6″ >
<button type=”submit” id=”btn_save” class=”btn btn-primary glyphicon glyphicon-floppy-disk”> ذخیره </button>
</div>
</div>
</form>

Z_Yamin 2020-02-25 12:32:50
this the form
harmlez_prinz 2020-02-25 12:36:17
from what i can see, you trying to equate the value of ur input to system_name?
Z_Yamin 2020-02-25 12:37:26
yes i want to get the it from button and set it to input for updating
harmlez_prinz 2020-02-25 12:38:41
first check if “button.data(“systemName”);” has a value using ur browser console.

console.log(‘button.data(“systemName”)’)

Z_Yamin 2020-02-25 12:41:06
it is also undefind
harmlez_prinz 2020-02-25 12:47:22
try

var data = $.parseJSON($(this).attr(‘data-systemName’));
alert(data)

harmlez_prinz 2020-02-25 12:48:51
You havent created any even on-click on the button.
harmlez_prinz 2020-02-25 12:50:43
The only even you have tirggered is that the modal form should display when you click the

<button data-toggle=”modal” data-target=”#editModal” class=”glyphicon glyphicon-edit btn btn-primary btn-sm” data-systemName=”{{$s->system_name}}” data-systemType=”{{$s->type}}” data-systemID=”{{$s->system_id}}”>
show modal Form
</button>

Z_Yamin 2020-02-25 12:51:12
so what should id do?
harmlez_prinz 2020-02-25 12:52:01
Z_Yamin 2020-02-25 12:32:45
<form method=”post” id=”frm” action=”{{route(‘system.update’,[$system])}}” name=”payment_form”>
{{csrf_field()}}
<div class=”modal-body” style=”margin-bottom: 50px;”>
<div class=”row”>
<div class=”col-md-6″>
<div class=”form-group required” id=”form-system_name-error”>
<label for=”system_name”>نام سیستم</label>
<input type=”text” class=”form-control required” id=”system_name” name=”system_name”>
<span id=”system_name-error” class=”help-block”></span>
</div>
</div>
<div class=”col-md-6″>
<div class=”form-group required” id=”form-system_type-error”>
<label for=”system_type”>نوع سیستم</label>
<input type=”text” class=”form-control required” id=”system_type” name=”system_type”>
<span id=”system_type-error” class=”help-block”></span>
</div>
</div>
<input type=”hidden” id=”system_id” name=”system_id”>
</div>

</div>
<div class=”modal-footer”>
<div class=”form-group col-md-6″ >
<button type=”submit” id=”btn_save” class=”btn btn-primary glyphicon glyphicon-floppy-disk”> ذخیره </button>
</div>
</div>
</form>

is this the form that comes up?

Z_Yamin 2020-02-25 12:52:13
yese
harmlez_prinz 2020-02-25 12:54:07
try this

<input type=”text” class=”form-control required” id=”system_name” name=”system_name” value = {{$s->systemName}}>

let see if you will get the value displayed

harmlez_prinz 2020-02-25 12:54:33
comment all codes in the editmodal event for now
harmlez_prinz 2020-02-25 12:55:30
You are trying to update the input fields right ?
Yannickshadownet 2020-02-25 13:08:32
hello everyone.I would like to write a request that uses 3 tables with which I will join with other tables then in a select select the data to display with query builder but I don’t know how to add the two additional tables in my DB :: table ( ‘artisans’) thank you for helping me
MIRXAN 2020-02-25 13:11:06
laravel_discuss-27832.jpg
Hi everyone. I really need your help. when page is redirecting its showing the link
MIRXAN 2020-02-25 13:11:09
every page
MIRXAN 2020-02-25 13:11:18
then redirecting
MIRXAN 2020-02-25 13:11:24
after this
prime 2020-02-25 14:00:24
i need help regarding api in laravel..,
Z_Yamin 2020-02-25 14:01:21
What do want to do?
prime 2020-02-25 14:05:22
am currently dealing with ecommence system…. … i need to know how to use the api…..”this is my first project ”
Yannickshadownet 2020-02-25 14:13:10
hello everyone.I would like to write a request that uses 3 tables with which I will join with other tables then in a select select the data to display with query builder but I don’t know how to add the two additional tables in my DB :: table ( ‘artisans’) thank you for helping me
Z_Yamin 2020-02-25 14:14:30
prime 2020-02-25 14:05:22
am currently dealing with ecommence system…. … i need to know how to use the api…..”this is my first project “

laravel project?

prime 2020-02-25 14:15:09
Z_Yamin 2020-02-25 14:14:30
laravel project?

yaap laravel project…

Z_Yamin 2020-02-25 14:15:33
prime 2020-02-25 14:15:09
yaap laravel project…

first you sould instal laravel passport in your project

Z_Yamin 2020-02-25 14:15:54
after that you can use api
|