custom html block feature

Cindy B. shared this question 20 days ago
Answered

I want to paste code into a "custom html block" feature that is supposed to be a part of a wordpress site but I can't find it. I am looking to be able to do this on the Event Details section of the Checkout Page. Can you tell me how to find it?

Comments (6)

photo
1

Hi Cindy,

Could you let me know what you are trying to edit and I can assist?

photo
1

I created HTML code that will ask the if/then questions to the customer to point out setup requirements and I want to put it in the EVENT DETAILS sections (unless you think it should go in a different area). Here is a copy of the code below. I tried to create a large text box and checked allow HTML but it only showed the first statement of is this Indoor or Outdoor. So next I'm just going to try sticking the whole thing into the code view on the Event Details code view. (waiting until tomorrow -Monday- to try it though incase anything breaks and I need help from you guys to fix it).


<style>

.hidden { display: none; }

.section { margin-bottom: 20px; padding: 15px; border: 1px solid #ccc; border-radius: 8px; }

.alert { color: red; font-weight: bold; margin-top: 10px; }

</style>


<form id="setupForm">


Setup Type





</form>


const indoorCheck = document.getElementById('indoorCheck');

const outdoorCheck = document.getElementById('outdoorCheck');

const indoorSection = document.getElementById('indoorSection');

const outdoorSection = document.getElementById('outdoorSection');


indoorCheck.addEventListener('change', () => {

indoorSection.classList.toggle('hidden', !indoorCheck.checked);

});


outdoorCheck.addEventListener('change', () => {

outdoorSection.classList.toggle('hidden', !outdoorCheck.checked);

});


// Indoor logic

document.querySelectorAll('input[name="steps"]').forEach(el => {

el.addEventListener('change', e => {

document.getElementById('stepsAlert').classList.toggle('hidden', e.target.value !== 'yes');

});

});


document.querySelectorAll('input[name="doors"]').forEach(el => {

el.addEventListener('change', e => {

document.getElementById('doorsAlert').classList.toggle('hidden', e.target.value !== 'no');

});

});


// Surface logic

document.querySelectorAll('input[name="surface"]').forEach(el => {

el.addEventListener('change', e => {

document.getElementById('grassSection').classList.toggle('hidden', e.target.value !== 'grass');

document.getElementById('pavedSection').classList.toggle('hidden', e.target.value !== 'paved');

});

});


// Conditional fields

document.querySelectorAll('input[name="gate"]').forEach(el => {

el.addEventListener('change', e => {

document.getElementById('gateWidth').classList.toggle('hidden', e.target.value !== 'yes');

});

});


document.querySelectorAll('input[name="dogs"]').forEach(el => {

el.addEventListener('change', e => {

document.getElementById('dogNote').classList.toggle('hidden', e.target.value !== 'yes');

});

});


document.querySelectorAll('input[name="sprinkler"]').forEach(el => {

el.addEventListener('change', e => {

document.getElementById('sprinklerNote').classList.toggle('hidden', e.target.value !== 'yes');

});

});


document.querySelectorAll('input[name="trees"]').forEach(el => {

el.addEventListener('change', e => {

document.getElementById('treeNote').classList.toggle('hidden', e.target.value !== 'yes');

});

});


document.querySelectorAll('input[name="branches"]').forEach(el => {

el.addEventListener('change', e => {

document.getElementById('branchNote').classList.toggle('hidden', e.target.value !== 'yes');

});

});


photo
1

the copy and paste didn't keep my starting and ending comments so I can easily find my start and end section of the code I created in case I need to go back in and edit it. Just attaching the .txt file here as I do want to insert the whole thing. I don't know why copy and paste left off the beginning and the end as it was clearly highlighted in the copy.

I also thought of a few more statements I want the customer to acknowledge too such as acknowledging that if there is going to be another inflatable company present we need notified ahead of time of who it is (had that problem this weekend even though the customer had our old paper version contract with that statement in the footer of every page of the contract).

And another question, only if it is a wet rental, stating NO well water because of iron staining.

I have not written either two of those statements yet.

photo
1

I'm sorry, If you just let us know what you are trying to do we can help

photo
1

Explained it all above and included the code I was going to insert but Cameron volunteered to add it so I sent it above. So Susan, not sure what you mean by "just let us know what you are trying to do" as I've already done that.

I was going to insert the code myself today to see if it worked but wanted to make sure I could reach someone incase things screwed up badly but I can't even call and talk with anyone in person on another thing I am working on (got leave a voice mail) and ended up just scheduling a call for tomorrow afternoon. So maybe I can just wait and insert the code while I am on the phone with then incase it breaks the system since it is already getting late in the day today.

photo
1

What I am asking is what are you trying to do with this code? The code may not be necessary that is why I am asking

Leave a Comment
 
Attach a file
You can't vote. Please authorize!
You can't vote. Please authorize!
You can't vote. Please authorize!
You can't vote. Please authorize!