i'm working on codeigniter where i'm using set_value function to get the value of dropdown
$category_id = $this->form_validation->set_value('Category[]');
but the issue is it is not working on multiple select. It is working where single value is selected.
In Codeigniter, select dropdown works with set_select() not set_value()
Reference: Codeigniter Form Helper Documentation
Can you try using set_select()?
Related
i am new to laravel backpack. I have a view where i have to show some details of a category, i have a dropdown list of categories on top and datatable below it listing all the details i want to update this data table when any category is selected and I want it use ajax so that it wont load the page again. I was unable to get any clue in the documents. Can someone point me to the correct way to implement this. Thank you in advance!
In Laravel backpack v4 as far I know you can use the variable crud and by calling this crud.table.draw()
You can see the file in datatables_logic.blade.php.
JQuery(document).ready(function($){
crud.table = $("#crudTable").DataTable(crud.dataTableConfiguration);
...
)}
I have used usual dropdown list and it's not worked,
when i click the submit button for all the data in the form except drop down value were sent to database.how can i fix it??
Your <select> is missing a name="foo" attribute.
A form will only submit elements with a name as part of the request.
Hello I'm new to laravel I was trying to find the solution but unsuccessful.
I manage to get the selected value using ajax but I cant show results in the same view that I selected from.
Let me explain what I want to achieve.
User select the value(id) from dropdown (populated from DB)
the value id need to be pass to controller get new array of a query result
return an array to the same view with show what was selected in dropdown
Any suggestion I will appreciate.
Thank you.
What I understood is , you want to populate one select box based on another select box value,
He are some best start tutorial for you,
http://www.9lessons.info/2010/08/dynamic-dependent-select-box-using.html
http://blog.chapagain.com.np/using-jquery-ajax-populate-selection-list/
I 'm using backpack crud for laravel and i'm trying to modify the displayed text inside cells on a list, when ajax is disabled, jquery does its job , but i need ajax enabled for showDetailsRow, so is there any way to change the X on the image for icons using jquery when ajax is enabled on the crud??
jquery :
$(document).ready(function() {
$(".parametro tr>td:nth-child(n+4):contains('X')").html('<span class="ion-android-done"></span>');
});
I recommend creating a custom Backpack column. You can use the boolean column code as example and just show the icon you want instead of true/false.
I think this would be faster and cleaner than using jQuery.
I am using Jquery data table plugin. I was able to display it properly with filtering, sorting and Paging.
But, now the problem is i need to filter the data table rows based on dropdown selection made.
but, i do not have any idea how to do this..I am very new to MVC. So, here i need to send that dropdown selected item as parameter to a server side method and call a method and rebind data to the data table.
I am initially binding data to the data table using for loop and iterating over a datatable
Do i need to use Ajax here..if so how to get the new datatable/data to this view and bind to data table?
Please suggest the way to do..
you use the jquery datatable for this
create function and paste jquery datatable code in there
then call this function on dropdown selection change using jquery.
Tips :jquery datatable code available on net find and use it