WordPress form submission issue - wordpress

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.

Related

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

Remove unwanted stuff in Contact Form 7 from function.php

For the people using contact form 7 for wordpress, it's knew that this plugin adds automatically some stuff in the output code.
The normal output looks like this:
<span class="wpcf7-form-control-wrap">
<input type="text" name="" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" aria-required="true" aria-invalid="false">
</span>
plus some tags, paragraphs ecc...
Is there a way to remove all the
<span>, <br>, <p>
from the output leaving only the input fields?
I need this to be done from function.php so i can safetly update the plugin in the future.

Text Input Types with Gravityforms

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/

Drupal 7 Search Autocomplete

I am trying to setup Search Autocomplete module in Drupal 7 on my website (kooknet.be),
but it does not work. I use the ID selector below, but nothing happens
#search-block-form
However, when I look in the code with Firebug I see the following
<input id="edit-search-block-form--2" class="form-text search_autocomplete_processed ac_input" type="text" maxlength="128" size="15" value="" name="search_block_form" title="Geef de woorden op waarnaar u wilt zoeken." autocomplete="off">
Why is autocomplete="off"? Can this be the reason why it is not working?
your id should be #edit-search-block-form--2

Resources