Text Input Types with Gravityforms - wordpress

I currently build a complex form with gravityforms. What i need is an area where i have some text and in between the text are some input-fields to complete the text paragraph.
EXAMPLE.
I,"name-inputfield"____, agree to be available between__"text-inputfield"__ and ____.
I already created that in a html editor and placed the code into a HTML Box of Gravityforms but if submit the information are not delivered. I believe i forget something inside the formcode.
I attached the code below
I, <input type="text" name="" value="NAME" size="40">(for myself and my heirs and legal representatives) of<br>
<input type="text" name="" value="STREET ADDRESS" size="40"><input type="text" name="" value="CITY" size="20" maxlength="20"><input type="text" name="a78" value="ST" size="2" maxlength="2"><input type="text" name="" value="ZIP" size="10" maxlength="10"><br>
hereby release Blanca's house Corp., its agents, representatives, directors, employees, contractors, insurers, and members from any and all responsibility and liability involving arising out of, or related to the planned medical mission scheduled to <span class=""><input type="text" name=" " value="" size="20" maxlength="20">starting on <input type="text" name="" value="" size="20" maxlength="20"> through <input type="text" name="" value="" size="20" maxlength="20"> 20<input type="text" name="" value="" size="2" maxlength="2">, including (without limitation) liability regarding my health or safety or my personal property.
Would be great if anybody could help me, because i never did something like this.
Here is also a screenshot of how it looks inside the browser http://awesomescreenshot.com/01e2la0ibc
Thanks a lot for any help

Inputs inside the content of the HTML field will not be captured by Gravity Forms. They aren't "registered" by Gravity Forms so it doesn't know they exist.
There are two alternatives for what you are trying to accomplish.
You can add the fields via Gravity Forms and then style them to be inline. Here is a great example of how this can be accomplished:
http://www.rocketgenius.com/gravity-forms-mad-lib-style-form-demo/
You can add the fields via Gravity Forms and then output the submitted values in an HTML field on a second page. Here is a example of this using my product GP Preview Submission: http://demos.gravitywiz.com/gp-preview-submission/

Related

WordPress form submission issue

Hello everyone and thanks for looking! I have an issue on my page where two forms exist, when you fill in just the bottom form, it prompts you to enter the fields from the first form as well. Is there a way to fix this? I have been trying to fix this all day without any luck.
The issue is happening in the "Remote Collector Update" form.
This is the page: https://www.device42.com/update-cadence-test
pass: 123
I have tried removing all sorts of ids and classes but nothing has worked so far.
<input id="f_email" class="wpcf7-form-control wpcf7-text wpcf7-email wpcf7-validates-as-required wpcf7-validates-as-email f_email field_error_txt" name="email-618" size="40" type="email" value="" placeholder="Work Email" aria-required="true" aria-invalid="false">
<input id="f_email" class="wpcf7-form-control wpcf7-text wpcf7-email wpcf7-validates-as-required wpcf7-validates-as-email f_email" name="email-618" size="40" type="email" value="" placeholder="Work Email" aria-required="true" aria-invalid="false">
Could there be a name conflict at validation time?
Maybe you could try changing the name in form one to email-617 and give it a try. Two elements sharing the same ID could also cause validation errors.

Wordpress search form by category not working?

Objective
I am trying to create different search forms for two different landing pages. Thus, users who end up on landing page A will only be able to search for products with categories Man and Book. Users landing on page B will only be able to search for products with categories Beast and Funny.
Here is my example setup in WooCommerce.
What I have tried
Based on this link, I have tried the following search function for page A.
<form role="search" method="get" id="searchform" action="https://test.com/">
<div>
<label for="s">Search for (Man and Book):</label>
<input type="text" value="" name="s" id="s" />
<input type="hidden" value="1" name="sentence" />
<input type="hidden" value="product" name="post_type" />
<input type="hidden" value="product_cat" name="man,book" />
<input type="submit" id="searchsubmit" value="Search" />
</div>
</form>
Problem
If I key in GetAllX into the search form, I expect to see GetAllX (Copy 2) only. Instead, I see GetAllX (Copy 2) and GetAllX.
Also, when I key in test, I expect to see Test product 2 only. Instead, I see both Test product 2 and Test Product.
Questions
Why is WordPress behaving like this? Can someone help me out with this, please?
If there is an easier way to create search forms for different product categories based on landing pages, please do let me know.
Found the error. It was in this line:
<input type="hidden" value="product_cat" name="man,book" />
It should be instead:
<input type="hidden" value="man,book" name="product_cat" />
There was a typo in the article I linked to.

Logging in and scraping a site like ft.com with BeautifulSoup

I have this url: https://www.ft.com/content/87d644fc-73a4-11e7-aca6-c6bd07df1a3c
It corresponds to an article that requires signing up. I signed up and can see the content in my browser. However when I use this code with the url above:
soup = BeautifulSoup(urllib2.urlopen(url), 'lxml')
with open('ctp_output.txt', 'w') as f:
for tag in soup.find_all('p'):
f.write(tag.text.encode('utf-8') + '\n')
Especially, it redirects me on the signup page. Is there any way to be logged in to have access to the article when scraping?
Here are the basics.
Go to the login page. If you use the Chrome browser you can position your mouse over the email input area and use the context menu (in Windows) and then its 'Inspect' entry to reveal the form element that will be used to submit your email address. It looks like this.
<form name="enter-email-form" action="/login/submitEmail" class="js-email-lookup-form" method="POST" data-test-id="enter-email-form" novalidate="true">
<input type="hidden" name="location" value="https://www.ft.com/content/87d644fc-73a4-11e7-aca6-c6bd07df1a3c">
<input type="hidden" name="continueUrl" value="">
<input type="hidden" name="readerId" value="">
<input type="hidden" name="loginUrl" value="/login?location=https%3A%2F%2Fwww.ft.com%2Fcontent%2F87d644fc-73a4-11e7-aca6-c6bd07df1a3c">
<div class="lgn-box__title">
<h1 class="lgn-heading--alpha">Sign in</h1>
</div>
<div class="o-forms-group">
<label for="email" class="o-forms-label">Email address</label>
<input type="email" id="email" class="o-forms-text js-email" name="email" maxlength="64" autocomplete="off" autofocus="" required="">
<input type="password" id="password" name="password" style="display:none">
<label for="password">
</label></div>
<div class="o-forms-group">
<button class="o-buttons o-buttons--standout o-buttons--big" type="submit" name="Next">Next</button>
</div>
</form>
You will need to gather the action attribute from the form element and all the name-value pairs from the input statements. You use these in a POST request with the requests library.
You do this once for your email address and once for your password. Then you should be able to issue the GET for the URL with requests.
I must warn you that I haven't actually tried this with that particular site.
If you are to scrape a website using BeautifulSoup, I'd recommend the MechanicalSoup library. It is a very lightweight layer on top of BeautifulSoup (to parse HTML) and requests (to fetch pages), but it will deal for you with things like filling-in a form properly (i.e. what you need here), following relative links, ...
MechanicalSoup is also limited in the sense that it doesn't interpret JavaScript code, hence won't work on a website relying on JavaScript, but it reduces the manual effort compared to using BeautifulSoup and urllib or requests directly.
(Note: I'm one of the authors of MechanicalSoup)

Integrating a custom built form with a subscriber list provider (Aweber)

I have created my own form because every other form out there for WordPress is horrible.
div class="exc-form">
<form action="action_page.php">
<fieldset>
<div id="form_jgrsh">
First name:<br>
<input type="text" name="firstname" placeholder="Please enter first name">
<br>
Last name:<br>
<input type="text" name="lastname" placeholder="Please enter last name">
<br>
Email:<br>
<input type="text" name="email" placeholder="Please enter email">
<div class="chk_bx">
<input type="checkbox" name="concent" value="agree">By entering my information and pressing submit I agree to subscribing to the Stockhouse AND Junior Gold Report (please check box before submiting)
<br>
</div>
<input type="submit" class="submit-btn" value="Submit">
</div>
</fieldset>
</form>
It's super simple and isn't anything special. I'm under the impression PHP will be needed as well.
I use Aweber as my list provider, and I've contacted them for support and they want me to use their horrible, ugly form builder, and won't help me integrate my own form to use their list.
I've never done something like this before, so I'm looking for some guidance on how to send subscriber information to a list. Aweber offer's a list ID and most plugins I've seen require a Aweber authentication before Aweber links up to the list.
https://labs.aweber.com/snippets/lists - this is as closest to the resources I could find from Aweber.
Here is the authentication list: https://labs.aweber.com/snippets/authentication

Why are my html5 labels not displaying in Live Web Preview?

I added this (taken straight from a book, "HTML5 24-Hour Trainer") to Default.aspx in an asp.net web project:
<form method="post" action="">
<fieldset>
<legend>Personal details</legend>
<p>
<label for="Name"> Name:</label>
<input type="text" name="name" id="Name"/>
</p>
<p>
<label for="Email"> Email:</label>
<input type="text" name="email" id="Email"/>
</p>
<p>
<label for="Tel"> Telephone:</label>
<input type="text" name="tel" id="Tel"/>
</p>
</fieldset>
<p>
<input type="submit" value="Submit"/>
</p>
</form>
The labels ("Name:", "Email:", and "Telephone:") are not displaying next to the text input controls (edit boxes) - or anywhere else (visible to me) for that matter if I select "Live Web Preview" (Ctrl+Alt+Enter). However, if I select View In Browser (Ctrl+Shift+W), I can see the labels.
And if I look at the page in any of my three options (Google Chrome, Internal Web Browser, or Internet Explorer), it works fine; it is only the Live Web Preview that is busted.
So the question is, why are the labels invisible with "Live Web Preview"? But I guess I'll just avoid that viewing option; no big deal.
Tried the exact same thing and it works as expected. I guess it's a local issue. Need more info.

Resources