I created a registration form for a website and I included the Place Autocomplete Address Form provided by Google to fill the Country, Province and City fields.
It works perfectly. However, I use Google Analytics and I have seen that a certain number of users leave the process before completing the registration, as if something went wrong and couldn’t complete it.
The form itself is quite simple, so I checked it with some possible errors.
It has several requested fields, so the form reloads partially to display a popup asking you to add the information or data in each case. The fields filled out correctly keep de information. All but the ones filled out by the Google API, which simply disappear. And I am not talking about the information added to them, the fields themselves are missing, removed from the code.
Any suggestion?
I created a registration form.
Some fields (Country, Province and City) are filled by this API:
Place Autocomplete Address Form
The code I used is on that page.
If you fill out the form and make any mistake or fail to fill any requested field, for instance, adding different passwords in the Password and Re-write Password fields, the form realoads partially displaying a message requesting you to fill them properly.
By them, the fields to be filled by the Google API are gone, removed from the code.
The problem is that when the user filled the, in the example, password and re-write password fields properly, another message popups requesting to fill the country, province and city fields.
Is it clear enough now?
Related
What I want to make
Is this possible?
I'd like to create an output form that reads data from a Google Sheets spreadsheet. In the form, users would enter a few values (entering their name and some ID number, for example) and view the corresponding information in the connected spreadsheet but not any other information in the sheet. Something like an output form in Microsoft Access. I'm hoping there's a way to accomplish this in Google Sheets using existing tools and maybe some scripting.
More generally, though, any way to create this type of 'limited visibility' on a per-user basis for Google Sheets data would be useful. (The 'protect sheet' function in the menu doesn't accomplish this; see below.)
For reference, my specific use case at the moment is as a teacher and wanting a way for students to see specific information related to them from my student information spreadsheet but while not revealing other students' information. I would have a simple form where they enter a name and maybe some personalized code that I give them so they can see their attendance record or something else. For my purposes, I don't need the form to be extremely secure as none of the information is all that sensitive (although more secure is better), but I don't want to be just putting all the information there in front of them by giving them access to the entire sheet.
What I've tried so far
I made a new spreadsheet file with two sheets; one sheet was visible to function as a form, and the second sheet was not visible (which I accomplished via the 'protect' menu option). I used importrange() to read in the relevant data from my primary spreadsheet to the new spreadsheet's non-visible sheet. On the visible sheet, students entered their name from a drop-down and entered their student ID as validation. If the student's name and ID matched, the first sheet did a vlookup() to read in information from the protected sheet and some information from their student record.
Here's what I made, in case my description doesn't make sense: https://drive.google.com/open?id=1cHO2jzMh1mkXvlLh-M4eYqN7v11t95-GnfWqL5IwQ14&authuser=0
This had two problems, one small and one big.
The small problem was that every student could see the "form" sheet at the same time. If two students opened the spreadsheet at the same time they would see any information that the other student had entered. I handled this by writing a simple script to automatically reset the "form's" input cells after 20 seconds. Also, any time the form was opened by a new person, the "form's" output cells were erased. So, obviously not a brilliant solution, but for my purposes, this was mostly good enough.
The big problem was that Google's own preview viewer (built into Google Drive and the like) ignores protected ranges and sheets and displays the entire contents a spreadsheet. (Normally, protected sheets are not visible at all and don't appear in the list of sheets at the bottom of the screen unless the viewer has access to them.)
In my case this meant included the protected one that shouldn't have been visible at all, rendered as if it were a print preview, meaning the students were actually able to view all of the other students' data in one big table.
Are you familiar with Web Apps?
An Apps Script Web App allows you among others to output selected Google Document contents into a browser.
Hereby, you can use the method Session.getActiveUser() to obtain the email of the user and dynamically adjust the data the user is going to obtain in function of his email (BTW, you can also use Session.getActiveUser() in the spreadsheet, to detect the user automatically instead of asking him for his name).
Simple example workflow:
Replace in column A student names through student emails (the Gmail addresses with which the users authenticate their sessions and access Google Sheets)
Bind to the spreadsheet a script with a content similar to the following:
function doGet(){
var ss=SpreadsheetApp.getActive().getSheetByName('Data');
var range=ss.getDataRange();
var values=range.getValues();
var user=Session.getActiveUser();
var output="";
for(var i=1;i<ss.getLastRow();i++){
if(values[i][0]==user){
for(var j=1;j<ss.getLastColumn();j++){
output+=(values[i][j])+" ";
}
}
}
return ContentService.createTextOutput(JSON.stringify(output));
}
Make sure that you have a doGet() function and a return statement.
After running the script once manually to trigger authorization flow, deploy it as a Web App - executing it as User accessing the web app and giving access to Anyone (unless desired otherwise).
Copy the URL of your WebApp and forward it to your student.
When the student open the URL in their browser - they will obtain their results - provided their email is listed in the sheet.
Please note that the code provided is a simple sample, that retrieves
all data and outputs it as a string. Feel free to modify the script
e.g. retrieving only columns of interest and outputting the data as a
html table, rather than a simple string.
I have a form on the home page of quotedjobs.com that I would like to persist the field values of across pages.
For example: A user enters some values in fields, such as job title (textbox), job type (list) and job description (text field). Underneath that I ask users to register on the site, but they have the option to click a link to allow them to login if they are already members.
What I would like to be able to do, is to redirect users to another form that is a copy, but allows them to login instead of register, but keep hold of the values that they entered in the title, type and description form of the previous page so they aren't losing their work.
I have seen the ninja_forms_processing variable in the docs, but I'm not clear on how to use that.
TL;DR - You can't.
As it was slim pickings here, I sent an email over to support. Got this response:
Hello,
At this time this use case is not possible in Ninja Forms. The plugin is currently unable to transfer data from field to field or between forms.
I’m sorry that we do not have a better solution for you at this time.
Thank you,
I'm currently working on a user registration form for a site I'm working on. The site requires a lot of information about users up front, and I'd like to break it down into stages.
The first stage requires the user to put in an identifier in the form of an order number. I would then check the order number exists in the system before making them continue to fill in the rest of the fields. I'm not sure how to go about doing this.
What I've managed so far though is to override the underlying User, RegistrationController and RegistrationFormType and render out a customised view with the relevant form fields.
An overview of the process I'd like would be:
FORM: ask for order number
process form and check order number exists (if not go back to 1)
FORM: ask for user information
process user information and store
complete
Simplest way of doing it will be to override registration template, and hide all fields except those you wanna show in first.
And than add some js validation rules, - to show up parts of form based on values prefilled by user. In that case you do not need to rework Sonata registration form, but for user experience it will be the same.
I'm using an Ektron HTML Form on one of my pages for registration for an event. The Form sends an email to my client with all of the information that the user put in. However, the email includes extra fields with data that the client does not need, and they find it confusing. In addition to all the fields that the user filled out, they're also getting fields such as "cx", "cof", "EktFormId", etc. The client finds this confusing and doesn't want the extra fields, they only want to be sent the info that was filled in (or left blank) by the user.
This is a screenshot of the email that is being sent upon form submission. We want to prevent everything before "FirstName" from being sent. Does anyone know how to do this?
The best way will involve a bit more legwork on your part. If you have the HTML form post to an Action Page, then your Action Page can use Request.Form to pull in the fields you want and then send your own email.
See the documentation and look for section "Redirecting Form Data to an Action Page"
So I'm new to both Zend and to Google Maps API, I want to create a form. Where the user inputs an address in a field (probably an field completely outside of the "form") the address is being looked up on google maps, preferably realtime but could also be done with a "search address" button. When user is happy with shown address, he submits form and address (or long/lat, whatever is best) is extracted from google map api and saved along with additional form data to database. How would this be done in the best way?
The easiest way would be to add two hidden fields to your form (lat/long) and handle the textfield in javascript. So when the user finished typing the address you start an ajax-request and write the resulting lat / long values in the hidden fields.
When submitted you should check the form and look for filled values in the lat / long fields. If they are missing show an error message to the user.