bootstrap-select icon indicating copy to clipboard operation
bootstrap-select copied to clipboard

selectpicker not refreshing after form submit

Open jmaxner opened this issue 9 years ago • 3 comments

I have a selectpicker in a dynamic table inside of a form (can add rows, delete rows).

My form submits correctly with all data. I am passing the index of the row where the selectpicker is located back to the success function in ajax. I need the selecpicker to refresh to pick-up the new product that was just inserted into the database. I know the index of the row that was clicked, just can't figure out how to refresh the selectpicker. Any help would be greatly appreciated.

$("#frmAddProduct").on('submit', function(e){ e.preventDefault();

	var form_data = new FormData(this);
	var post_url = $(this).attr("action");
	
	$.ajax({
		url: post_url,
		type: 'POST',
		data: form_data,
		contentType: false,
		cache: false,
        processData: false,
		mimeType:'multipart/form-data',
		success: function(data){
			var rowIdx = data;
			//console.log(rowIdx);
			$('.selectpicker').selectpicker('refresh');	
		}
	});

});`

jmaxner avatar Mar 08 '17 01:03 jmaxner

same issue am facing any solution??

vidyashree09 avatar Jul 07 '17 07:07 vidyashree09

  1. Provide environment details. Provide your operating system, browser(s), jQuery version, Bootstrap version, and bootstrap-select version.

  2. Create an isolated and reproducible test case. Create a reduced test case.

  3. Include a live example. Use this Plunker debugging template to share your isolated test cases. You can also make use of jsFiddle or jsBin.

caseyjhol avatar Jul 07 '17 13:07 caseyjhol

ninguna solucion que soporte

jeancarlos110295 avatar Jun 21 '19 18:06 jeancarlos110295