Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change dynamic status by dropdown #1064

Open
robertnicjoo opened this issue Dec 14, 2017 · 0 comments
Open

Change dynamic status by dropdown #1064

robertnicjoo opened this issue Dec 14, 2017 · 0 comments

Comments

@robertnicjoo
Copy link

Hi,

I'm working on laravel 5.5 and I have my statuses table, I would like to change my entries status using xeditable.

If my status was static 0 and 1 I know how to do that but my problem is that I don't know how to edit dynamic data.

I shared same question on stackoverflow here is the link

I will repeat my question here in case someone would like to help here:

I have select button where i choose status for my entries and this status comes from statuses table and it's not a column is each table (it's general option) so what I want to do is to change status_id column in my tables with help of x-editable but i don't know how to get my dynamic data in JavaScript.

Here is my current form to show statuses in index page of my reviews for example:

<form action="{{route('updatebyajax', $rating->id)}}" method="post">
  {{csrf_field()}}
  <td class="text-center" style="width:100px;">
    <select class="form-control status" name="status_id">
      @foreach($statuses as $status)
          <option id="rating" class="rating" data-url="{{ route('updateratebyajax', $rating->id) }}" data-pk="{{ $rating->id }}" data-type="select" data-placement="right" data-title="Edit Rate" value="{{$status->id}}">{{$status->title}}</option>
      @endforeach
    </select>
  </td>
</form>

So what I need is basically get info out of statuses table and change by select.

wbptn

Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant