"We are revamping our Knowledge Base articles to serve you better. In case you find something unusual, do not panic. Reach out to our Support Team by submitting a ticket if you ever need some help.”
  1. Home
  2. DropFunnels Builder / Editor Basics
  3. **Experimental** Replace Text, placeholders or other items with Jquery

**Experimental** Replace Text, placeholders or other items with Jquery

**Experimental** Replace Text, Placeholders and other items with Jquery

First a very clear warning! We recommend customers do not use this method of making changes unless they are fully comfortable with Jquery / Javascript. It can lead to issues with your website and we are unable to provide support for the methods contained in this article.

We recommend at the first signs of issues on your website you delete or comment out the HTML modules you are using for this method before contacting support. You may need to use SafeMode to disable the HTML module.

These instructions are provided for Chrome Browser, other browsers may work, but have different names, steps etc. required.

Step 1: Find the website element you'd like to change. Visit your website right click the element you'd like to change and select "Inspect"

Inspect

Step 2: Check if you have the right element. The element you selected will be highlighted in blue, you can expand and make sure this is the item you want to change by clicking the small arrow to the left.

bluehighlight

Step 3: Copy the elements path. Right Click the Element, goto copy and select Copy JS Path

js-inspect

Step 4: Paste into notepad.

Copy the text within your clipboard into a notepad document. It will look like this:

document.querySelector("#la_ask_before_result_form > div:nth-child(3) > div:nth-child(2) > input[type=text]")

Step 5: Navigate to Properties.

Click to expand your element categories and select properties.

If you have recently used properties you may not need to expand the categories.

expand

Step 6: Expand the property list > Click the first element to expand a full list of properties.

first element

Step 7: Find the Property you'd like to replace and copy it > Scroll To the Text or other value you'd like to replace and Right click, then press "copy property path"

scroll to placeholder

Step 8: Paste to Notepad

Within your notepad create a new line and past the property path.

Step 9: Combine your JS Path and Property Path.

Add a period in front of your property path, copy this and add it to the end of your JS path

It should look like this:

document.querySelector("#la_ask_before_result_form > div:nth-child(3) > div:nth-child(2) > input[type=text]").placeholder

Step 10: Add your change.

You are now ready to add the replacement text or html to do this see the below example:

document.querySelector("#la_ask_before_result_form > div:nth-child(3) > div:nth-child(2) > input[type=text]").placeholder = 'new text';

Step 11: Wrap your script.

You'll now need to get the line you've created wrapped and ready to add to a html module :

<script>
jQuery(window).load(function($) {
document.querySelector("#la_ask_before_result_form > div:nth-child(3) > div:nth-child(2) > input[type=text]").placeholder = 'new text';
});
</script>

The red writing is the wrapper for your Jquery line, the green is your Jquery line

Step 12: Add to HTML module.

Add a html module near to the bottom of your page and add your created code.

Once you've saved and refreshed your page you should now see the element changed.

Was this article helpful?

Related Articles

DF Black Trimmed

ANNOUNCEMENT:
Our Knowledge Base articles are undergoing a comprehensive overhaul to enhance your experience.

If you encounter any unexpected issues or irregularities, feel free to connect with our Support Team by submitting a support ticket for prompt assistance.
Join our Slack Workspace

Join the DropFunnels Slack Workspace and get access to the DropFunnels team, other DropFunnels members, twice-weekly support calls and more!

Join our Slack Workspace

Become A DropFunnels Wizard


Complete our Fast Start Training and learn everything you need to know to launch your first or next funnel.

From Lead Capture to Products, Courses to Blogs, this easy-to-follow training covers it all.

We’ll even give you $50 credit for completing the training!


Become A DropFunnels Wizard