I have posted WordPress Google Form v0.59-beta-1 in response to a request to have the ability to preset form values by passing a parameter as part of the WordPress URL. This is an interesting request so I did some work on it this morning and it turned out it wasn’t to difficult to implement.
Much like custom field validation and presets, this new functionality builds upon the name of the field that you want to preset. Google has a way to preset values, the field name is passed as a parameter with a value. This new functionality does much the same but pulls it back to WordPress for processing.
Using my Validation Demo form as an example, here are two URLs:
As you can see, the second URL will have the first two fields prefilled with the values which were part of the URL. The following was appended to the URL. The specific parameter names (e.g. entry.1666054688) had to discovered by examining the source Google Form.
?entry.1666054688=joe@example.com&entry.327623672=www.yahoo.com
Mike what a great idea. :->
Thanks.
my question is how does one get rid of the “This is a required question” lines that appear after each question. For me, this line is redundant since the *required notice on the form already exists. Any thoughts?
This can be removed with CSS. The latest version of the plugin should take care of this but it doesn’t always work depending on the structure of the HTML and the CSS for the theme you are using.
Assuming you haven’t used any CSS prefixes, if you add the following CSS, it should hide those messages:
div.required-message {
display: none;
}
Thanks for the quick response. The fix worked.