How can I hide the HTML in a gravity form field from appearing in te confirmation message? - html

Basically I am using a radio button field and have added HTML in the field itself to link and a preview plugin class like so
Field: Sedan, 3-passenger View
And this works fine except when the form gives confirmation message using the corresponding field's merge tag {vehicle you would like} it shows the entry and all the HTML as a string as well, which obviously is a problem. How can I fix this issue and have the confirmation treat the html as such? Do I have to add all of this html as a class instead and apply it to the unique entry css instead of inline or is there some way to mess with the merge tags or with minimal css changes to the confirmation message classes?
The stuff in the confirmation field in the form UI (using inline styles to test for now, I know its not the best way but either way doesn't really solve my problem):
<p style="text-align:center;"><strong style="font-size:16px;"> Thank you!!!</strong>
We will send you an <strong style="color:#8E0F0F;">Email Quote</strong> within the next <strong style="color:#8E0F0F;">30 minutes.</strong>*
*Subject to Driver Availability.
<strong style="color:#8E0F0F;">Important Warning: When we send you an Email Quote, it might end up in your SPAM/JUNK EMAIL folder, so please double check that folder.</strong></p>
<strong>Submitted:</strong>{date_mdy}
<strong>Status:</strong> Waiting to be accepted by a Service Provider.
<strong>Pick Up:</strong> On{Pick-Up On::7}, at {At::8} at
{Address (Street Address):9.1} {Address (City):9.3}
<strong>Drop Off:</strong> {Drop-Off Airport/Cruise Port:10}
<strong>Passenger or group name:</strong> {Passenger/Group Name:15}
<strong>Number of Passengers:</strong> {Number of People in the Group:16}
<strong>Contact Person:</strong>{Contact Person's Name:17}
<strong>Quote will be emailed to:</strong>{Contact Person's Email:18}
<strong>Rate:</strong> {What Type of Vehicle Would You Like?:6} Quote to be Provided. <strong>15% Online Discount Active!</strong>
Extra question on the same form, is there any way to attach a timestamp to the {date_mdy} merge tag so it actually includes the time of submission in the confirmation and not just the date? Obviously the hook exists since entry time is shown in the WP backend but I don't know how to go about getting it to work here. Thank you for any replies, this car reservation form has been a headache.

Related

extract data from contact form 7 email and inject into database using postie function

i’ve set up an online form using contact form 7 that posts to my secret postie email address. each email gets collected and listed in draft format for moderation.
the post_type i’m using is one called testimonials that comes with my theme, which doesn’t have a body section as such, instead it has four custom fields – ‘author_name’, ‘author_company’ [not required], ‘author_url’ [also not required] and ‘author_quote’.
what i would like to do is have postie auto-fill the author_name and author_quote fields instead of trying to fill the [non-existent] body, using the your-name and your-message fields in contact form 7. that is, i want the values of the contact form your-name and your-message fields to be injected into the database as the meta_values of the pyre_author_name and pyre_author_quote meta_keys
i hope that makes sense?
i tried tweaking the add_custom_field function in the filterPostie.php file to see if anything worked, but no
function add_custom_field($post) {
if (‘testimonials’ == get_post_type()) {
add_post_meta($post[‘ID’], ‘pyre_author_name’, ‘$your_name’);
add_post_meta($post[‘ID’], ‘pyre_author_quote’, ‘your-message’);
return $your_name;
return your-message;
}
}
can anyone see what i'm doing wrong, or know what i might have to try to achieve what i want?
the site i'm working on is here: https://sistascarpentry.co.uk/testimonials/
thanks in advance

Multiple form labels - Lightbox

I am editing html codes for web accessibility but I faced one problem about Multiple form labels. I am using Wave plugin to check web accessibility.
Errors is
Multiple form labels
What It Means
A form control has more than one label associated with it.
The problem is that there is a page user can input user info, and a button to call pop up then the pop up has all same fields again to register if user did not input the field.
Instead of changing ID of the field in popup, is there any quick and easy way to remove the error?
From W3Schools:
The id attribute specifies a unique id for an HTML element (the value
must be unique within the HTML document).
So yes, you need to define a unique ID for each and every component. This is the only clean way to solve your problem, otherwise a screenreader could read the wrong label when you focus one of your input fields.
One way to fix this other than changing IDs is to wrap the input in the label.
<label>
First Name
<input />
</label>
This is semantically correct and avoids the labels needing for and associated input id attributes.
You obviously might need to refactor some stuff and it seems like more hard work than just changing some IDs but that is an option (I know you will have probably fixed this by now, this is more for reference if someone else comes to this question.)
See: https://stackoverflow.com/a/774065/2702894

to view the text inputed by user in form action tag

Log in name of my users are not showing by my tags
How can i view the text or file that inputed by users on my HTML website in 'form action'-<input type=text> or <input type=file>?
I have already tried by simple tags
Eg:your logged in to my website by name:'USER'
And in 2nd page i want to view your name
As "hi USER"
Your question isn't all that clear. Within each input field you want to save. Try putting the users value in there:
input(type="text", name="email", value=user.email, placeholder="email")
The above is in jade template format so might look different from yours. If you added some code and a little more information to your question, you'd get the answers your looking for.
Best of luck.

Accessibility of UI Widget that is a composite of input field and button

We have UI widget that is a composite of input field and an icon. This widget is basically meant to be used as a form field to let users select a value from a huge list of values. Users can either type a value in the input field or click on the icon to launch a dialog with all the possible value list. Selecting a value in this dialog will set the value in the input field. Users can also type a partial value in the input field and tab-out in which case, the widget tries to autocomplete the value entered and if it doesn't succeed, it will launch the same dialog as user clicking on the icon.
How would I make such a widget accessible through screen readers? There doesn't seem any role or any other aria attribute which seems to be tailor made for my usecase. At the minimum, I would expect the users using screen readers to know that this widget has an helper icon from where a value can be selected.
I am reading this as an order database/form, where call takers can just select type in the customer number or fill out the 10+ fields. And if the caller doesn't know their ID or whatever, the call taker can do a search.
I recommend removing the autocomplete on tab functionality, because that wouldn't too fun for some. I'd code it like:
<p id="instr">Put instructions here</p>
<label for="user">Look Up User</label> <input id="user" aria-describedby="instr">
<input type="button" value="Populate Form">
<input type="button" value="Search">
I made an answer about modals quite some time ago, that should get you started. The listing in the dialog may not be the most fun to wade through. I'd recommend either updating this question or making a new one for that part.
Interesting and challenging.
To start with make sure icon has an alt text which explains its role - this is assuming it is an image. If not use title attribute to explain its role.
Add a title attribute to the input box and succinctly mention that user can also chose values using icon or partially type its value to autocomplete it.
If your form design allows instructions to be placed next to the form fields place a descriptive text right next to the widget.
These recommendations may not make it entirely accessible but will surelytake you close to where you want to be. I'm hoping that this widget will be used in more than one place in your project allowing user to get accustomed to it.
Last one to consider is to see if any aria role fits your widget controls in any way.

How not to pass a specific form field?

I'm writing a landing page to test a business idea.
For testing purpose, I want to write a Credit card number field, to see if the customer is actually ready to buy the product.
As it is only a test, I don't want this value to be submitted.
Actually for security purposes I don't even want this value to be sent in the request.
Is a separate form enough?
<form> Sensitive info</form>
<form>Info I want
<input type="submit">
</form>
Yes, only the elements from the one form will be sent (whichever one was submitted).
Alternatively, you could:
mark the input as disabled (either from the start, or onsubmit)
remove the name attribute of the input
put another input later in the form with the same name (it will override the value of the first)
Yes, that will work.