Unique field validation in Google forms - validation

Using Google forms, data can saved to the spreadsheet. Now i would like to apply validation in Username field for avoid duplication. How can add UNIQUE validation in google form field using Google script?

I think it is not possible to add validation for fields in Google form values by using Google Apps Script direcly.
One thing you can consider to change the settings in the Google form itself, if the Username field value is same as the Username that logged in to access that form. You can do this by checking the "only allow one response per person(required login)".
If the above solution does not apply for your requirement, the UiApp/Html Service in Apps Script will help you in creating custom forms.
You can create a custom form and write a custom function to get the Username field values using SpreadsheetApp class into an array. Before submitting the Form, compare the Username field from Google form with the list of username cell values that we got in an array and check for uniqueness.
Hope that helps!

Related

Google Forms: Autofill fields based on data from external database

Basically what I'm trying to do is create a form with fields that are autofilled (such as name, address, email etc) based on info in the first field of the form (social security number). All data is stored in an external MySQL database.
So when I manually enter a SSN in the form, I need some kind of script to run and check the database for the corresponding values associated with the SSN, and autofill these values into the corresponding fields in the form, and if the SSN is not found in the database it should let me fill out the fields manually.
not possible with google forms which does not support running code at form fill time.
instead write a webapp with appscript or appmaker.

Laravel form request check if two passwords match?

I am working on a user registration form in laravel 5. I wish to know is it possible to use laravel's form request validation to check if the two passwords submitted by the user are thesame. Is it possible to do that with using requests?
Yes, it's possible.
There is an validator called confirmed.
confirmed
The field under validation must have a matching field of
foo_confirmation. For example, if the field under validation is
password, a matching password_confirmation field must be present in
the input.
https://laravel.com/docs/5.2/validation#rule-confirmed

Can I populate multiple fields in my Podio app using Email to App?

I've been trying to populate a Podio app using Email to App.
However, the problem is that the app only takes 3 blocks of data from an email submission: the subject, the sender, and the body. This would be sufficient if I had two fields of data to populate. However, I have 10 fields of data to populate in the app.
How can I send an email with the 10 fields of data and populate an app entry?
This article from 2010 is the only thing Podio says about this feature and yet it is not working for me. I have tried sending an email with
name:my name
location: my location
car: my car
...
in the body, and the Podio app simply places the entirety of the email in each field.
You cannot populate multiple fields with Email to App feature in Podio. To handle. Use Podio API for advanced use cases.
Populating multiple fields to Podio still works as descibed in https://help.podio.com/hc/en-us/articles/201019648-Email-to-app.
Email to item configuration:
Example email text:
Resulted item created:
If you are just looking to populate the data.
You could put the 10 items into the email body and send them as formatted text into Podio.
If you have dynamic data, you could achieve this by e.g. iterating through an array.
Other than that you have to use the API.
The method in the post you link to is correct and works.
In the email the format:
fieldname: content
.. gets mapped with "content" being put into the item's field with the name "fieldname". Use the field mapping user interface if you want to choose which fieldname:-label from the email maps to which field in the Podio item.

Can we prepopulate the webform fields with values in webforms for marketers?

We have a requirement to pre-populate the Contact Form with user information on load if the user is a logged in user. So that, user need not fill his information using the webform.
Is there any way to do this using webforms for marketers?
Data is coming from a service api in json format. Need to figure out a way to bind it to fields either in server side or in client side.
Sitecore Version 7.1 140117 WFFM Version "Web Forms for Marketers
2.4.0 rev. 140117"
Have a look at Sitecore - Webforms For Marketers Form - Use ReadQueryString Option. Basically, there is a checkbox, ReadQueryString, in presentation details that gives you the option to fill in the default values from the query string. If checked, you use the item names of the fields (not the display name or title) as keys and the values you want to set the fields to as the values in key-value pair in the querystring.
Create a new rule based on use default value from user profile [fieldname] field and amend it to pick up the value from your service API.
This will be your best way and simplest option in my opinion.
I use this same approach prepopulating ucommerce data from its API.
Create custom field and then you can pre-populate values as per your need.
Like if you want to populate any value in Single line text field the create custom field for this and then reflect forms dll and copy code then update code as per your need.
Please check https://sitecoretweaks.wordpress.com/2015/02/20/custom-field-type-for-sitecore-web-form-for-marketers/ blog post for more details.

Joomla 2.5 - custom registration field not remembering values

Im using custom profile plugin found at http://library.logicsistemi.it/images/joomla/plg_user_testprofile.zip
I have created several fields, both, optional and required and they all work. But there is a tiny problem.
When I enter some value in that custom fields and submit the form it can happen that some fields dont pass validation (which is good). However values entered are cleared and I must fill all the fields from the beggining.
Demo: http://goo.gl/eH1G2
Enter some (not all) data under the 'legend' named User Registration
Enter some (not all) data under the 'legend' named Company
Informations
Press Register button
Error message will pop in. -
Data entered in the User Registration will be saved
Data entered in the Company Informations (which are custom fields)
will not be saved.
If all required fields are entered, form will submit data to database
(which is ok).
I want that data in the Company Informations are saved, so users dont have to type in all over again.
The problem in your demo is on the template you are using.
For some reason it gives Javascript errors. These errors blocks the Javascript client side validation and your form is submitted with invalid data.
If you want only server side validation you can modify the onContentPrepareData function in your plugin by loading posted information from the user state. To do this you have to permeform a different action when user_id is not set under "Merge the profile data." comment.
I think next week I will write a new tutorial on http://library.logicsistemi.it to explain this. For now try to fix your Javascript code.
Regards

Resources