Drupal WebForm With PinPointe--Avoid Confirmation Page - drupal

Our company uses PinPointe for email marketing and we have a Drupal 6 site with several language domains. I have created a web form except I did not create any fields in Drupal. Instead in the node Edit NOT THE NODE WEBFORM EDIT....in the node edit for the body section I added the HTML and the javascript for form. Everything works well and the data is captured to pinpointe. The problem lies in the fact that the page..upon clicking submit..actually redirects to PinPointe where I get a friendly message saying. Thanks for joining. Well I don't want this. I would like to just pop an alert saying thanks and leave the user on the page they were on. I tried this code for using jquery to do the post but it isn't loading and I suspect that's because I need it in the header not the body.
So all I want is to submit the data to pinpointe and not redirect the user. So here is where my limited Drupal knowledge runs out:
If I create the input fields in the node webform then how do I get the form to post to pinpointe?
If I create the fields dynamically in the node body (not node>>webform) I can direct the submission to PinPointe but then how do I stop the redirect?
FWIW here is the jquery I was trying to use but suspect has to go in the header http://jsfiddle.net/4xDFK/4/
FWIW here is the code for the dynamic creation:
<form action="http://na04.mypinpointe.com/...." id="webform-client-form-1375" method="post" onsubmit="return CheckForm257(this);">
<div>
<div id="webform-component-UsrEmail">
<div id="edit-submitted-UsrEmail-wrapper">
<input id="edit-submitted-UsrEmail" name="email" size="30" type="email" />
</div>
</div>
<div class="form-actions form-wrapper" id="edit-actions">
<input class="form-submit" id="edit-submit" name="op" type="submit" value=" " />
</div>
</div>
</form>

Create your custom confirmation page in Drupal. Then set up PinPointe to redirect to this confirmation page.
In the PinPointe form manager, there is a option under the 'Thank you page options' to send a signup user to a custom URL.

Related

Search Wordpress Site and External (Non-Wordpress) Site Search Form with Radio Buttons

I'm trying to duplicate the search box on this site : https:clearviewlibrary.org over on a Wordpress install here: https://news.clearviewlibrary.org
I was able to get the search box to execute a search on the external site with this code:
<div>
<form method="get" action="javascript:void(0)"
onsubmit="window.open('http://www.wsld.info/#section=search&term<%=Config%>#section=search&term='+this.term.value+'', '_blank');return true;">
<label>
<input type="text" class="searchform" name="term" placeholder="Search Our Catalog" /></label>
</form>
</div>
but I'm stumped on how to go about adding the additional search functionality and radio buttons.
I've tried taking the code from the clearviewlibrary.org site, but that didn't work. I also saw this, but would rather not have the two buttons : HTML form action search, one text box, 2 buttons, 2 possible results
Thanks,
Brad

Is there a good way to pass both form information and URL parameters to server?

In my web forms project (a forum) I have a form that is accessed through a link from another page, a link which includes parameters. for example:
EditPost.aspx?mid=0
When the page is loaded, the form hasn't yet been submitted and Request.QueryString contains the URL parameters I loaded the page with. However, after I send the form, Request.QueryString conatins the values of the form fields. This is a problem because I need the URL parameters after the form is sent.
The question is, how do i make the page send me those URL parameter with the form information?
If I'm approaching this wrong, and I'm supposed to keep the URL parameters from when the page is first loaded, let me know how.
Thanks!
Edit:
<form action="" id="f_editComment" name="f_editThread" method="post" onsubmit="return true;">
<%=ThreadTitle %>
<textarea id="body" name="body" runat="server"></textarea>
<input type="submit" id="submit" name="submit" />
</form>

Form work on server, not locally. Ultimately need a programatic solution to submit the form

I need to submit this form (preferrebly using cURL):
<form method="post" action="results.asp" name=FrontPage_Form1 onSubmit="return true">
<input name="regno" size="7" maxlength=7>
<input type="submit" name="B1" size="15" value="Submit">
</form>
This form is on a website and works well there, redirects to page http:website//results.asp and shows the information.
BUT if I download this html form and open it in my local browser and submit, it does not work
the results.asp page says 'Access denied' in html page generated by the asp page.
Additional information:
- when the html page is on the same server: entering a wrong 'regno' results in a page which says exactly that
- Upon opening this form locally, it always says, access denied.
Please let me know if any of this is not clear.
If you open an html file into your local browser and then try to post to another page without the full URL, then it will look in the same directory for that file, which I imagine doesn't exist since you don't have access to it. You need to enter the full path in the form action, like so:
<form method="post" action="http://www.resultsserver.com/results.asp" name=FrontPage_Form1 onSubmit="return true">

How do I redirect with WebRequest?

I created a WebRequest to POST information. My objective is to emulate in C# a PayPal "buy now" button which is in html.
How do I get the redirect when sending the WebRequest? Simply having Response.Redirect doesn't work because I have to have the redirect with the information.
The code of the button I'm trying to emulate is:
<form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
...
</form>
You can not do redirect with post.
What you can do: Make the actually post direct to the paypal, or redirect to a second page that re-create all the post data, and make automatic post with javascript.
An example of how to create a page with parameters that make automatic post.
http://www.codeproject.com/Articles/37539/Redirect-and-POST-in-ASP-NET
Not sure you can do what you want from code behind. I had a similar situation where I had the form like yours besides the normal ASP.net form. I hid the non-ASP.net form through CSS so it's not in the user's face and then I triggered the POST via javascript (I put a button inside the form and then called buttonX.click(); )

Honeypot Captcha classic asp code?

Good morning, I am trying and failing miserably to implement a captcha, mostly because I have no asp experience, could anyone assist?
Multiple html pages have a contact form in footer, this has form validation in place and fires off an asp page which sends an email & redirects to thanku.asp.
I wanted to add the honeypot captcha, so added another field [body] and hid it using css. I then added the code below that to check its null. When I click submit the form is processed even when hidden field has content inside, can anyone spot where I am going wrong?
<div id="captchafield">
<input type="text" name="body" value="" />
</div>
<script language=javascript>
if(!String.IsNullOrEmpty(Request.Form["body"]))
IgnoreComment();
</script>
You're going wrong by checking the field with only JavaScript; you should check that it's blank server-side and if not, then ignore / reject submission. E.g.
HTML
<div id="captchafield">
<noscript>Security field; please leave this blank</noscript>
<input type="text" name="captcha" value="" />
</div>
ASP
Dim captcha
captcha = Request.Form("captcha")
If captcha <> "" Then
Response.Redirect("badcontent.asp")
End If
' continue
What you can use JavaScript for is to hide the captcha field and / or display a message which lets users know not to fill it in if their JavaScript is off (see <noscript> in example code above). Bots / scripts will ignore the warning and fill in the field and trigger your trap.

Resources