Issues exporting manually to website...

User 2507616 Photo


Registered User
2 posts

Hey all,

First of all, thanks for all the useful info on here! Especially to Richard who was so helpful in the thread I read.

So I'm manually exporting my site to my root directory. It's a Wordpress site on a testing server at the moment, and I've synced it to dreamweaver so I can edit CSS easier.

I've read other threads: http://www.coffeecup.com/forums/web-form-builder/can-the-page-name-or-full-url-be-added-to-form/ about using Javascript to capture the url of the page the form is being filled in from.

I've matched all the fields up to their counterparts using the MailChimp API key.

So, I'm modifying the HTML code of the exported file slightly (vault.html) to include the javascript references from the thread, and then uploading - but it's not working.

Is the method i'm employing wrong, or is there another way?

Or is this just impossible?

see my form here http://technocloud.in/dqrealestate/VAULT_exported/VAULT.php

User 2507616 Photo


Registered User
2 posts

Well, I've kept playing and it's basically working...

Just needs some tweaking.

so to send current URL details to MailChimp:

1. Create the Form in web form builder
2. Use a text field for the URL (not a url field) as it doesn't capture http:// and makes it invalid)
3. Connect to Mail Chimp using the API code and Sync up your fields
4. Export site manually
5. Copy and save the javascript embed code, you'll need it later.
6. Open the HTML file that has been exported
7. Hide the <div> tags that display the URL capture field (i want mine hidden). You can do this by <div... ...style="display:none;" >
8. Put the following code in the header ABOVE the script that is already there

<script type="text/javascript">
var query1 = parent.location.pathname;
var urlname = query1;
</script>

9. Put the following code below the url capture field

<script>
document.getElementById('item7_text_1').value = urlname;
</script>

10. Rename the 'item7_text_1' in the pasted code above to be the same as the name of the url capture field.
11. Upload and test
12. Copy full URL of the form
13. update any reference to your form in the embed code, to the full URL. (make note that the second reference uses a subfolder)

That's a whole 8 hours of searching and fiddling - so I hope it helps someone!!!

:)

Adam
User 187934 Photo


Senior Advisor
20,271 posts

Thanks for the update on your work around.:)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.