Answer the question
In order to leave comments, you need to log in
October CMS AJAX pass radio, checkbox?
Following the example in this article https://mraak.ru/octobercms/october-cms-builder-pl...
<input type="checkbox" name="checkme" value="0">
<input type="checkbox" name="checkme" value="1">
<input type="checkbox" name="checkme" value="2">
<button ion="data=#fullpage input;ajax=/orderscooter;prepend=#SystemMessages;">Заказать</button>
function onStart(){
$checkme= post('checkme');
....
Answer the question
In order to leave comments, you need to log in
Suspicions justified
dataParse: function (selector)
{
var inputs = $(selector).length;
var data = {};
for (var i = 0; i < inputs; i++)
{
var obj = $(selector).eq(i);
var name = $(obj).attr('name');
if(obj.val() !== ""){
data[name] = obj.val();
} else {
if(obj.attr('value') === undefined){
data[name] = obj.text();
} else {
data[name] = obj.attr('value');
}
}
}
return data;
}
<input type="checkbox" name="checkme" value="0">
<input type="checkbox" name="checkme" value="1">
<input type="checkbox" name="checkme" value="2">
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question