Using shortcodes within PayPal forms - forms

I set up a PayPal form with hidden fields in order to collect user information on PayPal and cross-reference what users had paid for a specific item.
After the most recent updates, the shortcodes I used stopped working within the form.
Now the information saved is actually the text of the shortcode, not the output of the shortcode information.
An example of the form code looks like this:
<input name="os0" value="[wpv-current-user]">
This used to collect the username, but since the update, the information it collects is the text "[wpv-current-user]" even though, when outside the form, the shortcode works just fine and will display the username.
Any suggestions?

Related

Place Autocomplete Address Form

I created a registration form for a website and I included the Place Autocomplete Address Form provided by Google to fill the Country, Province and City fields.
It works perfectly. However, I use Google Analytics and I have seen that a certain number of users leave the process before completing the registration, as if something went wrong and couldn’t complete it.
The form itself is quite simple, so I checked it with some possible errors.
It has several requested fields, so the form reloads partially to display a popup asking you to add the information or data in each case. The fields filled out correctly keep de information. All but the ones filled out by the Google API, which simply disappear. And I am not talking about the information added to them, the fields themselves are missing, removed from the code.
Any suggestion?
I created a registration form.
Some fields (Country, Province and City) are filled by this API:
Place Autocomplete Address Form
The code I used is on that page.
If you fill out the form and make any mistake or fail to fill any requested field, for instance, adding different passwords in the Password and Re-write Password fields, the form realoads partially displaying a message requesting you to fill them properly.
By them, the fields to be filled by the Google API are gone, removed from the code.
The problem is that when the user filled the, in the example, password and re-write password fields properly, another message popups requesting to fill the country, province and city fields.
Is it clear enough now?

Ektron Form including extra fields in Post email (Ektron 9)

I'm using an Ektron HTML Form on one of my pages for registration for an event. The Form sends an email to my client with all of the information that the user put in. However, the email includes extra fields with data that the client does not need, and they find it confusing. In addition to all the fields that the user filled out, they're also getting fields such as "cx", "cof", "EktFormId", etc. The client finds this confusing and doesn't want the extra fields, they only want to be sent the info that was filled in (or left blank) by the user.
This is a screenshot of the email that is being sent upon form submission. We want to prevent everything before "FirstName" from being sent. Does anyone know how to do this?
The best way will involve a bit more legwork on your part. If you have the HTML form post to an Action Page, then your Action Page can use Request.Form to pull in the fields you want and then send your own email.
See the documentation and look for section "Redirecting Form Data to an Action Page"

How do I make a link that pre-fills a form checkbox?

I have a page called contact.htm with a working form. One of the checkbox fields on the form is named Garden (so either it is checked or not when using the form).
I have another page that I want to link to my form page, so that if a user clicks a particular link, they are sent to the form page and the field Garden is pre-clicked.
I have not been able to do this though I have tried several methods...such as:
a href="contact.htm?checkbox=Garden,on" or
a href="contact.htm?checkbox=Garden,checked" or
a href="contact.htm?input type="checkbox" name="Garden" value="checked", and some others.
I would appreciate any help.
You'll need to use JavaScript on the target webpage to process the argument and fill the values in. There is no automatic way of doing this just by URL.
This link shows how to retrieve URL arguments from JavaScript. From there, it's a matter of using standard JavaScript or JQuery to fill the values in.

Cannot use 2 Email forms on iOS website?

I am having an issue on a Mobile WordPress site.
At the bottom of the page is the standard post comment form which ask for a users email, below that form I have another separate form that is used as a Contact form in the footer of the page.
No matter what I do, when I select the Footer Contact forms email field on an iOS device, it automaticly jumps focus to the Comment forms email field instead.
Both forms are inside there own tags with different names and id's
Both the email fields do have the id="email" but that's what is needed for the back-end, at least for the name fields.
This is an issue I have never seen and my initial search has found no help.
Any ideas how to fix?
UPDATE
Testing in Chrome on Desktop does the same affect, clicking the second Email form, automatically brings Focus to the 1st email input form
I figured out the problem. My Form had a <label for="email"> field which was switching focus to the other email field

Paypal IPN Custom field

I know I can send a custom field using IPN with $_POST['custom']
But can I do that with an uploaded file? More specifically an uploaded image?
And what if I have two custom fields? I previously used something like this:
<input type="hidden" name="custom" value="<?php echo $a.'|'.$b ?>"/>
But that was just text! Now I want to upload a file and I also have custom text, then I want to get it.
Is this possible and how would that look like?
Thanks!
I don't think it's possible to do it the way you're describing, but here's an alternative that I have used in the past.
Instead of having the form that contains the file upload post to PayPal, have it post to your site, and then store that uploaded file and any other custom data in a database (or any other way you choose to store it). Assign that data an id.
Now redirect the user to a page that contains basically the same form, except that the input fields should be hidden, and the form will post to PayPal. Fill in that form programmatically with the data from the previous post, and fill the 'custom' field with the id that you assigned to the custom data. This page would also contain a JavaScript statement like this (at the bottom after the form, to ensure that it doesn't execute until the form is loaded)...
<script type="text/javascript">
document.forms["paypalform"].submit();
</script>
...to automatically submit the form when the page is loaded. It's still a good idea to leave a submit button (you could style it as a link, if you want) in case the user has JavaScript disabled. It could say something like "Click here if you are not redirected to PayPal within 10 seconds." You could also add another message on the page such as "Redirecting to PayPal."
Now when you get your PDT or IPN information back from PayPal for that transaction, the 'custom' field will contain the id you assigned to the data earlier. It's just a matter of retrieving the data from wherever you stored it.
I've done this in ASP.NET before, and I assume it would work just as well in PHP (the server-side parts), but I can't say for sure.
Note: The 'custom' field can only contain up to 256 characters.