Add a custom form to a WordPress post - php

I have a WordPress site that is used as a news portal to generate traffic for my clients (leads). I want the ability to add a custom HTML code with the form in it.
The posted data (the form structure) contains several parameters that needs to be changed in each blog post in order to send the data to the relative campaign in my crm.
Form should display perfectly in mobile as well, thank you page is handled by the form attributes so no need to worry about that.
any tips?

Related

How Can Implement Post-grid- Address checker into My Wordpress Website Contact us page For Address Verify

I am Looking for How to Implement "Postgrid" - Address checker into My Wordpress Website Contact us page For Address Verify. i have simple contact us page on my website,
Address Checker Website : https://www.postgrid.com/address-checker/
`
Since you're using WordPress the integration should be straightforward if you have access to the HTML of your page. Here is the link to the guide that goes over the integration.
First, you need to retrieve your API key from the developers page on the PostGrid dashboard (you'll need to create an account if you haven't made one already). If you're hosting this site on a publicly accessible web page, you'll want to create a "Public" key and add the URL of your website to the list of valid origins. This will ensure nobody can grab your API key and use it on their own website.
Second, you'll need to add special attributes to the tags in your HTML form element for the form. You'll want to add a data-pg-verify attribute to your form tag and then data-pg-address-line1 tag to your Physical Address form field. You'll also want to add a data-pg-full-address-line1 attribute to your form tag to ensure that the autocomplete places the complete address into that one form field instead of looking for separate city, province/state, country fields.
Lastly, you can set up elements which will display the errors (if any) with the address (e.g. data-pg-status, data-pg-generic-message, etc). The linked guide outlines how to do this in detail.

Pass form submission data to laravel from wordpress subfolder (or embed form)

I have a laravel project I inherited from another developer. It has a sub-folder with wordpress installed (for a separate CMS that is not integrated with the laravel project). What is needed is, on a wordpress page, there is a gravity form. On the form submission, I have to pass the form data over to the laravel (main public folder) project. Is there a way to pass over the data? I have tried to use the gravity form's redirect and just redirect the form submission to the main page. But, it doesn’t seem to collect the data. Anyone know how to do this?
The other option, would be to "embed" the laravel form. I know (or at least I think I know) the view/blade file that the form has. But, would need a way to embed it into a wordpress page. Didn’t know if that might be a possibility. Thanks!

How to use php in wordpress template to modify on-page details?

There must be a standard answer to this question which must come up all the time, but I haven't been able to find the solution.
I am trying to set up the return page from a PayPal payment on a Wordpress site. I have a button on the sales page which sends the transaction to PayPal and once completed PayPal sends POST data back to a url for a page that I specify on my site.
The responding page on my site needs to perform a confirmation handshake with PayPal, read the POST data, email me with the details, and display a table to the customer with the details. All except the last action can easily be done with php, but displaying the table (which should be the easiest) is where I'm stuck.
I have a draft "Thank you for your order" page on standard page in Wordpress. I have created a custom template file which can be selected from the Templates dropdown selector on the Edit page. The custom template can host the php code to perform the handshake, get the POST data and email me with the details.
However, the template (which is a copy of the Atahualpa theme's index.php file) renders the page by various Wordpress function calls, and I don't want to interfere with those. However, this means that I can't directly control the page rendering using echo commands in php. With javascript or jquery I could allow the page to load and then modify the innerHtml, but this seems to be a clumsy way of doing it, and it would probably be visible to the user, as page elements are first rendered then modified.
What's the best way to do this?

Wordpress send the url the registration form was filled out at as part of the email

I have a wordpress site with two registration forms on it, they are located on two different pages via "theme my login" short code. I would like to be able to track which of the form's the user submitted the registration form on, I'm thinking via the admin email that notify me there is a new user or even as a field as Im using Cimy user extra fields, my question is
1) are either of these options possible
2) which is quicker / easier to achieve as It has to be done asap
3) can you point me in the right direction for guides or even the codex if its that simple.
im guessing the I would need to find the hook in wordpress that is responsible for the admin email and add the wordpress either $_SERVER['REQUEST_URI'] or a wordpress equivilant?
You can include the url of the page which you embed the form, in the email. You can use hidden input field if you have used a custom form. If you have used contact form 7 plugin, you can get needed information from this url http://contactform7.com/special-mail-tags/

auto-populate another form using a link, it is possible?

I'm trying to make an app on Android that send an URI that auto-populate the "RFC Emisor" and "RFC Receptor" of this web page:
https://verificacfdi.facturaelectronica.sat.gob.mx, if I'm correct those two inputs have the id of:
ctl00_MainContent_TxtRfcEmisor
ctl00_MainContent_TxtRfcReceptor
I already tried this but it didn't work:
https://verificacfdi.facturaelectronica.sat.gob.mx/&ctl00_MainContent_TxtRfcEmisor=123456789&ctl00_MainContent_TxtRfcReceptor=123456789
there is a way to achieve what I want?
The short answer is no. The browser won't automatically detect the URL parameter and pre-populate any form fields. A back-end PHP / ASP.NET page can read the value from the request and generate the HTML fields with the specified values. Alternatively, the page could use JavaScript to set the field values when the document finishes loading.
But all of this depends on changes to the target web page. If you do not have the ability to modify that page, I'm afraid there's very little you could do.
You might be able to duplicate the form on your own page, and send the form data to the target—effectively bypassing the form on the other page and 'faking' your own, but if the target system does some kind of validation to prevent posting forms across domain names, this probably won't work either. You may have create the form and process it yourself, replicating the entire form interaction programmatically when a user submits a form to your server. In any case, none of these options are particularly graceful.

Categories