How to add pre-made text to a form with a button click from another page? Wordpress Elementor - wordpress

I have a home accomodation website and it has a page with all the rooms and another one with contact info and email form. The page with rooms has a "Book" button under every room. My idea was that when the "Book" button is pushed than the wepage automatically goes to the Contact page and room info is submitted to the email form. For example when i press the Book button under 3-people bedroom than the text "The client likes to book 3-people bedroom" is added to the email form. I am using Wordpress and Elementor builder for my page and Formidable for form.

I think you could even do this simpler then the suggestion of Umair by indeed adding a parameter to the url. But then istead of using the echo, you can easily retrieve the values by adding the following code as default value in the form [get param=parameter]
So in your example you would create three buttons with following url
https://example.org/contact?room=room1
https://example.org/contact?room=room2
https://example.org/contact?room=room3
On your contact form choose the field in which you want to show the text and add as default value
[get param=room].
Obviously you can change the text after the parameter 'room=' in whatever you want.

Hi Yes you need to add a get request url (https://testdomain.com/formpage/?formtext=formtitle) of this button so when the user click on the button it will redirect with the get request url like this https://testdomain.com/formpage/?formtext=formtitle
then you can add this variable echo where ever you want to display this text also in the fomidable form also have this variable option to place in form.
so your form will be display with the selected text by default.
if( $_GET["formtext"]){
echo $_GET["formtext"];
}

Related

Gravity Form query string appends '|:||:||:||:|2372' to the end of the data

Right now I'm trying to create a custom confirmation page to be displayed to the user after they finish filling out one of my forms. This custom confirmation page will use some of the data that they entered into the form. Right now I only have 3 fields: name, phone number, and a logo image.
So I went into the Settings->Confirmations section of my form and set Confirmation Type to Page, chose the page, and checked off 'Pass Field Data Via Query String'. Then I entered in the string 'gym_name={Gym/Program Name:2}&gym_phone={Gym/Program website and/or phone number:3}&logo={Logo:4}'. The logo parameter is passed as the image src url.
I ran through a quick test of my form and after filling it out, all of the data was successfully sent to the confirmation page, with one problem. For some reason, Gravity Form appends '|:||:||:||:|2372' (it's not always 2372, it's different every time) to the end of the logo section of the url. This happens no matter where in the query string I put logo, and it does not get appended if I don't include the logo.
Does anyone know what the cause of this is, and how to stop it? Thank you in advance.
I'm assuming the Logo field is a Post Image field. If so, you'll need to use the :url modifier to retrieve only the URL.
&logo={Logo:4:url}
More details here: https://docs.gravityforms.com/post-image-merge-tags/

WP Conctact from 7 hook - add additional mail is chekbox in form is checked (wpc7)

I have Contact Form 7 in my WordPress. The form has two text boxes and one checkbox. How can I send a copy of the letter, if chekbok selected? Perhaps there is a hook, which allows you to do this?
I believe you can accomplish this by editing the form tag, of course in your case you would edit the checkbox form tag and not the select form tag shown below :
[select your-recipient "CEO|ceo#example.com"
"Sales|sales#example.com"
"Support|support#example.com"]
and then editing your mail tag like so:
[_raw_{field name}] ([_raw_your-recipient]
For a more in depth explanation check out this link: https://contactform7.com/selectable-recipient-with-pipes/

How to style gravity form that is embedded inside email?

We are using Gravity form to send out notification email when a user signs up and registers for friend/family for an event, and it's embedded with following code:
[gravityforms action="conditional" merge_tag="{Do you want to register any family members or friends?:30}" condition="is" value="Yes"]
You have also registered:
{list:31}
[/gravityforms]
Since email styling only accept inline styling, how can I style the table that is embedded inside email when I don't have direct access to it?
You can format the email notification in the gravity form edit screen. Open your registration from for editing, go to 'Form Settings' -> 'Notifications' and at the bottom of the page check the 'Disable Auto-formating' box. Now you can write custom html into the 'Message' pane and format any way you like.
My colleague found where the table inside gravity form is coming from: wp-content/plugins/gravityforms/includes/fields/class-gf-field-list.php - get_field_input
So one needs to go to (line 393 in my file):
$list = "

How to Get GA to do Site Search with Tumblr

In Tumblr, searches are set up so that the query is a method/parameter of the search controller. Basically it looks like this: /search/:query.
I've been playing around from the client side trying to edit it so that it posts in this format:
/search/example?q=example
I'm doing this because GA looks for a parameter in searches. My problem is is that from the JavaScript to the form methods and actions, I cannot get the thing to spit out a query parameter at the end.
Is there anyway to tell Google to look for /search/:query instead of looking for a parameter in the URI?
Yes, you can do this by creating an advanced filter.
Go to your account Admin and then either click on the Account > All filters button on the left, or else the View > Filters button the right. Which one you use depends on whether you want this to be applied to all properties/views of the account, or only to an individual view.
Then, click the + New Filter button.
Enter in a name for your Filter Name such as "search string"
For filter type, select Custom filter radio button.
Then select the Advanced radio button.
Then from the Field A->Extract A dropdown, select Request URI. In the input field to the right of this, enter in ^\/search\/(.*)
Then from the Output To->Construtor dropdown, select Search Term. In the input field to the right of this, enter in $A1
Then save the filter and you should be good to go.

how do I get the upper text in a facebook open graph action story?

Take a look at the action link story examples in the Facebook documentation here: https://developers.facebook.com/docs/opengraph/actionlinks/ . Note this isn't a question about action links, but rather about other aspects of the example on this page; I'm not using action links, just publishing open graph actions.
In the "Story with Action Link" example, there's a line of text between the action and the action object below; the line is "You have to give this a try! Delicious!" This line of text does not appear in the second example, "Story after Action Link Clicked."
How do I get that line of text to appear? I have action posts working, but I can only get the result in the second example.
I noticed in my Action definition that under "optional properties," there's a field called "message." I tried setting that, but it didn't come out. Is there something else I should be setting to use this extra text field? Is this text field only available if you are using action links, or can I use it without them?
The text set in "message" field comes up in activity the way you want on timeline as personalised message , but your opengraph action should be approved with "user messages" property.

Resources