Skip Navigation

[Resolved] The js code or CSS in the toolset for doesn't reflect in the form

This support ticket is created 4 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 7 replies, has 2 voices.

Last updated by salimA 4 years, 2 months ago.

Assisted by: Waqar.

Author
Posts
#1831639

Hello

I have an issue that when I try to add js code or CSS in the toolset for it doesn't reflect in the form, even if I clear the browsing cache.

#1831665

Hi,

This is the new support ticket and I've set your next reply as private so that you can share the clone/snapshot of the website.
( ref: https://toolset.com/faq/provide-supporters-copy-site/ )

regards,
Waqar

#1832761

Hi Waqar,

Any update on this issue?

#1832801

Hi,

Thank you for sharing the duplicator package.

It didn't include the website's files, but I managed to deploy the database only backup along with the default files.

When I checked the form "VU Registration Form", it's custom JS and CSS code was properly getting included in the page's source code. However, these are the issues with the added code:

1. CSS code:

The added custom CSS code is not correct syntax, which is why it will have no affect on the front-end:


h2 {
  color: blue;!important;
  font-family: verdana;!important;
  font-size: 20%;!important;
}

The correct code should be:


h2 {
  color: blue !important;
  font-family: verdana !important;
  font-size: 20% !important;
}

2. JS code:

The added code needs to be initialized when the page loading completes.

The current code looks for an element with ID "demo", but I don't see any such element:


document.getElementById("demo").innerHTML = "Hello Dolly.";

If you'll try this simple JS code, you'll see it will work:
( ref: hidden link )


jQuery( document ).ready(function() {
	alert( "ready!" );
});

I hope this helps.

regards,
Waqar

#1832905

Many thanks Waqar, for your support. It works fine now.
Also, we have another question

We want to pass a value through URL from the external webpage to the toolset form page, but WordPress did not recognize it as a value. It deals with it as a full URL page and the page did not open.

for example,
hidden link ( the redirected WordPress page)
after passing the value it should be like " //www.test.com/test-form/?lang=en?111098". And the page must be open
But we get
hidden link with the error "page not found"

New threads created by Waqar and linked to this one are listed below:

https://toolset.com/forums/topic/split-the-js-code-or-css-in-the-toolset-for-doesnt-reflect-in-the-form/

#1833983

Could you Please make the last reply private as I add our domain by mistake

#1833997

Thanks for the update and glad that my message helped.

I've removed the actual domain's reference from your message and split a new ticket for your new question.
( ref: https://toolset.com/forums/topic/split-the-js-code-or-css-in-the-toolset-for-doesnt-reflect-in-the-form/ )

You're welcome to mark this ticket as resolved and I'll reply to the other ticket shortly.

#1835169

My issue is resolved now. Thank you!