Welcome to WebmasterWorld Guest from 54.226.33.117

Forum Moderators: rogerd & travelin cat

Email capture form --> Downloadable content

Possibly php ...

     
1:59 pm on Dec 24, 2017 (gmt 0)

New User

joined:Nov 24, 2017
posts: 27
votes: 0


Hi.

I'm going to be sending out some leaflets soon that will invite recipients to a webpage URL where they can pop in their email address (which is then forwarded to me in an email to be added to a mailing list unless it can be automated, which I bet it can) and then they're forwarded through to a downloadable content link.

I'm just wondering how I'd go about doing creating the form in html (if possible)? Code examples would be great.
Otherwise, if it isn't possible... How do I go about it?
4:02 pm on Dec 24, 2017 (gmt 0)

Administrator from US 

WebmasterWorld Administrator not2easy is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Dec 27, 2006
posts:3563
votes: 197


Your site is WordPress based according to this topic: [webmasterworld.com...] and that is an important part of any question because the answer for your question in WordPress is easy - get a plugin. The answer on a static html site would not be the same.

Is this for a separate site that is html based?
12:16 am on Dec 25, 2017 (gmt 0)

New User

joined:Nov 24, 2017
posts: 27
votes: 0


The site itself is html based though I have wordpress installed for the blog and I use wp-admin (which says Wordpress at the bottom) to write, publish and schedule blog posts.

However, it is odd; plug-ins don't seem compatible for my site... It makes me wonder whether or not the Wordpress site is being mirrored on my website (if that's even possible, I daresay it is) causing the wordpress code to not function, for example, when I use <strong> and </strong> tags to make text bold, it shows the actual tags itself and doesn't make the text bold, instead I have to use <b> and </b>... however, if it was a case of that, why would I have WP installed in my website directory?

Are we able to send links via private mail? Perhaps I could send you my website so you have a better understanding of what I'm dealing with? I have looked at site review but the fee is a bit high for me, I haven't got much value from the forum as yet though I do feel like I'm starting to get somewhere.
1:48 am on Dec 25, 2017 (gmt 0)

Administrator from US 

WebmasterWorld Administrator not2easy is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Dec 27, 2006
posts:3563
votes: 197


In wordpress, there are two editors, the text editor and the visual editor. The tabs are at the top right of where you compose your posts. If you type <strong> in the visual editing mode it will work as described, showing the tags. You should not need to type in any html such as <b> because those tools are above the composition panel. 1 click is easier than 5 keystrokes.

I am sorry, but I need to ask if you have looked at your Settings file or visited the Plugins area of your Admin interface? These are areas within the Admin panel when you are logged in and able to compose posts. There's a menu on the left with all the areas for the tools you would need to use for plugins, updates, permalink syntax and more. If you are not yet familiar with those areas, it would be useful to look around in there. The more work you do before understanding the platform, the more rework you may have ahead. I say this because if plugins are somehow incompatible with your installation of WordPress, then there is something seriously wrong.
2:15 am on Dec 25, 2017 (gmt 0)

New User

joined:Nov 24, 2017
posts: 27
votes: 0


There were no plugins when the site was first made. I installed Form Ninja and the forms didn't work, neither does the Wordpress powered contact form (which works on wordpress.com - not sure about .org) and as I say, neither does the <strong> tabs.

I can install and activate plugins, however... They just don't seem to translate properly.
6:19 pm on Dec 25, 2017 (gmt 0)

New User

joined:Nov 24, 2017
posts: 27
votes: 0


I've gone and cracked it... Well, half of it anyway.

<div id="content-wrapper" class="content-wrapper">
<div id="content" class="site-content">

<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">



<article id="post-3" class="post-3 page type-page status-publish hentry">
<header class="entry-header">
<h1 class="entry-title">Contact</h1></header><!-- .entry-header -->
<div class="entry-content">
<p>Contact us below:</p>
<div id='contact-form-3'>
<form action='https://example/contact/#contact-form-3' method='post' class='contact-form commentsblock'>

<div>
<label for='g3-name' class='grunion-field-label name'>Name<span>(required)</span></label>
<input type='text' name='g3-name' id='g3-name' value='Harry Albert Group' class='name' required aria-required='true'/>
</div>

<div>
<label for='g3-email' class='grunion-field-label email'>Email<span>(required)</span></label>
<input type='email' name='g3-email' id='g3-email' value='name@example.com class='email' required aria-required='true'/>
</div>

<div>
<label for='g3-website' class='grunion-field-label url'>Website</label>
<input type='text' name='g3-website' id='g3-website' value='https://example.com' class='url' />
</div>

<div>
<label for='contact-form-comment-g3-comment' class='grunion-field-label textarea'>Comment<span>(required)</span></label>
<textarea name='g3-comment' id='contact-form-comment-g3-comment' rows='20' class='textarea' required aria-required='true'></textarea>
</div>
<p class='contact-submit'>
<input type='submit' value='Submit &#187;' class='pushbutton-wide'/>
<input type="hidden" id="_wpnonce" name="_wpnonce" value="d8b20162d8" /><input type="hidden" name="_wp_http_referer" value="/contact/" />
<input type='hidden' name='contact-form-id' value='3' />
<input type='hidden' name='action' value='grunion-contact-form' />
</p>
</form>
</div>


I just viewed source on my wordpress page, copied the relevant code, switched up the relevant email address to the correct one but the issue is, I click on Submit and it takes me to my .wordpress.com site instead of my actual website.

Is it possible to edit that code so instead of it forwarding me to my .wordpress.com site, it literally just says "Your message has been sent."?


[edited by: not2easy at 7:16 pm (utc) on Dec 25, 2017]
[edit reason] ToS/use example.com [/edit]

8:03 pm on Dec 25, 2017 (gmt 0)

Administrator from US 

WebmasterWorld Administrator not2easy is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Dec 27, 2006
posts:3563
votes: 197


This code is from a WordPress Contact Form plugin. You should install the plugin you want to use on your actual site and not use the plugin at your wordpress.com site. Wordpress.com is only for non commercial sites and if you use that plugin and then contact people for business you may find your wordpress.com site closed. They are serious about free hosting for non-commercial sites only.