joaocastro88
Forum Replies Created
Viewing 6 replies - 1 through 6 (of 6 total)
-
Forum: Plugins
In reply to: [Event Tickets and Registration] Populate / AutofillI made a js to do that, but the plugin is blocking it:
document.onreadystatechange = function () { if (document.readyState == "complete") { console.log('aqui1'); let elements = document.getElementsByClassName("tribe-tickets__form-field-input-wrapper"); console.log('aqui 2', elements); let elementsCheckbox = document.getElementsByClassName("tribe-common-form-control-radio"); console.log('aqui 3', elementsCheckbox); if(elementsCheckbox.length > 1){ console.log(elementsCheckbox); let first = elementsCheckbox[0].children[0].children[0].id; let firstArray = first.split('_'); let firstLast = firstArray[firstArray.length-1]; console.log('click2'); let second = elementsCheckbox[1].children[0].children[0].id; let secondArray = second.split('_'); let secondLast = secondArray[secondArray.length-1]; console.log(first); document.getElementById(first).onclick = function(){ console.log('click3'); for(let i=1;i<elementsCheckbox.length;i++){ if(elementsCheckbox[i].children[0].children[0].id.includes('are-you-a-vegetarian_1_'+firstLast)){ console.log('exists'); console.log(document.getElementById(elementsCheckbox[i].children[0].children[0].id).val); if(document.getElementById(elementsCheckbox[0].children[0].children[0].id).value){ document.getElementById(elementsCheckbox[i].children[0].children[0].id).checked = true; } } } }; document.getElementById(second).onclick = function(){ for(let i=1;i<elementsCheckbox.length;i++){ if(elementsCheckbox[i].children[0].children[0].id.includes('are-you-a-vegetarian_1_'+secondLast)){ console.log('exists'); console.log(document.getElementById(elementsCheckbox[i].children[0].children[0].id).value); if(document.getElementById(elementsCheckbox[0].children[0].children[0].id).value){ document.getElementById(elementsCheckbox[i].children[0].children[0].id).checked = true; } } } }; } if(elements.length > 1){ let first = elements[0].children[0].id; let second = elements[1].children[0].id; let third = elements[2]; let firstValue = elements[0].children[0].value; console.log(first); document.getElementById(first).onkeyup = function(){ for(let i=1;i<elements.length;i++){ if(elements[i].children[0].id.includes('given-name_1')){ document.getElementById(elements[i].children[0].id).value = document.getElementById(elements[0].children[0].id).value; } } }; document.getElementById(second).onkeyup = function(){ console.log('click3'); for(let i=1;i<elements.length;i++){ if(elements[i].children[0].id.includes('surname_1')){ document.getElementById(elements[i].children[0].id).value = document.getElementById(elements[1].children[0].id).value; } } }; } } }But dont work in any place, and on jsfidle works well.
Can help with this?
ThanksForum: Plugins
In reply to: [Event Tickets and Registration] Populate / Autofillhello.
Any news?Forum: Plugins
In reply to: [Event Tickets and Registration] Populate / AutofillHEllo,
Yes i’ve sent the ticket.
(#304419)
Yes, i need to autofill the inputs when i fill the first atendee person, able to fill the next inputs with same informatio.
ThanksForum: Plugins
In reply to: [Event Tickets and Registration] Populate / AutofillHello,
Anyone can help me with it?What i notice is showing 0% on variable products.
On simple products is ok.Im using the Bacola Theme.
In some products show well, others not.https://pasteboard.co/dbuQqcoaZbxt.png
https://pasteboard.co/mIh41yj9OT8U.pngIs not easy to understand why this happen, have some idea?
Thanks
Viewing 6 replies - 1 through 6 (of 6 total)