How to limit the same answer within one submission of google form? - google-forms

I have created a group project signup form using google form. And there are two blanks where the students have to fill the names of their team members, I have created dropdown lists including all students in the class. But I do not want the student to submit the response with the same name for all team members. Is there any way to restrict the student not to fill the same name? Or is there any way to prevent the students to submit the forms if they try to submit the response with invalid answers?
To make it short, what I want is:
within one response, no same answers are allowed for different questions.
I have tried to search online, but all of them are about how to disallow students to submit duplicate responses.
Thank you.

What you could do is make check boxes with the names of every student in the class. Then all they have to do is select which people are in their group.
Example:
(#) represents the check box.
(#) Student name 1
(#) Student name 2
(#) Student name 3
(#) Student name 4
(#) Student name 5
and so on.....
Then whatever boxes they check off are the ones that are in their group. Because with the check boxes, they can't pick the same person twice. That's because it is only one question, but the student can pick multiple people.
I hope this answers your question, and have a wonderful rest of your day.

Related

Merge ACF fields into another ACF field

I'm building an athlete profile database using ACF (Advanced Custom Fields). I have fields for First Name, Last Name, and Full Name. Athletes will be able to enter their first and last names on the front end of the website when they are creating a profile. I don't want them to enter their full name also because that's a bad user experience. But I need the full name on the backend. Is there a way to have the Full Name text field auto-generated by merging the values of First Name and Last Name? I don't want to enter the full name manually. Thanks!
with this kind of thing you are wanting to combine 2 fields into 1 record it may just be easier to ask for the full name in 1 field this is not a bad user experience as much as you may think more people actually find it more annoying needing to put different parts of there name in different boxes.
However if this is what you are wanting to move forward with I did find this which may be of some assistance Wordpress/ACF merging multiple fields value to one

Adding a user-filled value as well as a pick value for google appmaker

I would like to define a field, where there is a list of allowed values as well as give user the option to type it in. For example, I list a bunch of previous jobs that the applicant can have, plus have them pick other and fill it in as well.
Is it possible to do this with one field or do I need two fields where the user has to type it in? Is there a doc. or sample or tutorial I can look up? Thanks.
Here is a super simple Tags sample:
https://drive.google.com/open?id=0BxtQI4fTAVQqcUx4OUJfQ1JYV2c
To cover your exact use case you just need to:
Add logic to check if record already exists
1.1 If record doesn't exist, then create one
Create relation between records
If you don't care about duplicates in your database, then you can skip step 1 and always do 1.1 and 2.

Enter data in mother table using data from child tables

Hi all,
I have 3 tables in an access 2010 database:
Crew: CrewID; Name; Adres;...
Voyage: VoyageId; Voyage name; Departure harbour; Arrival harbour
Crewlist: CrewlistId, VoaygeId, CrewId, Rank
The VoaygeId and CrewId from the Crewlist table are linked (relation) to the autonumber ID's from tables 2 and 1.
My first and main question is: Upon boarding everyone has to ‘sign in’ selecting the voyage and there name, and assign them a roll (of to be donde by the responsible officer). How can I make a form that lets the users browse through the voyagenames and crewnames in stead of the ID’s uses in the ‘mother’ table (table 3: Crewlist)
2nd question: how can I make sure that someone isn’t enrolled twice for the same voyage (adding same voyagenumber and same crewId number in crewlist). This would preferably be blocked upon trying to add the same person a second time on a voyage.
To prevent duplicates in Crewlist, add a unique index to the table on both CrewId and VoyageId
It would be a good idea to add relationships and enforce referential integrity
You are now in a position to use the wizards to create a form based on Voyage and a subform based on CrewList with a combobox based on Crew
There are a number of refinements you could add.
Make sure you do not use reserved words like Name and do not put spaces in field names. You will thank yourself later.
See also create form to add records in multiple tables

Submitting form custom module

I have a question regarding drupal 6 forms.
I have 4 tables:
location[locationid, name];
package[packageid, name],
person[personid, name, locationid, address, etc...]
pickup[pickupid, personid, packageid, locationid, _pickup_day_,...].
I've made forms and form_submit for the three tables: location, package, person (simple CRUD as usual).
Now, I want to make a form to submit data into the "pickup" table. The twist is, the only
data the user needs to input is the "pickup_day" field, which can be 1 or 0 (monday or tuesday).
So I imagine when I go to the pickups url, I'll see a list of output fields:
firstname | lastname | location | pickup day | package type
first1 last1 church1 select box (monday/tuesday) select box (type1/type2/type3)
first2 last2 church1 select box (monday/tuesday) select box (type1/type2/type3)
first3 last3 church1 select box (monday/tuesday) select box (type1/type2/type3)
[submit button]
When its submitted, the data goes into "pickup" table.
I'm trying to figure how to render the select boxes while outputting person's information.
(Just an aside, would it be possible to have a search before seeing the form...for example I search for
location to be church1, then I'll see all the users at that location in a form as above)
All help is very much appreciated...even pointing to a module that does something similar to this is fine...
I just need to get some hints on how people have approached this. Much thanks!
End goal:
So, basically, I have a number of people in my database. Each person is assigned a location where they can go and pickup food. I want to record each pickup for each week for each person. So I have a pickups table to do that. So I'm trying to make a single form (pickups), where I can go to and update who picked up what...on what day (Monday or Tuesday). But so in this form, I need to show all the people registered for a particular location. So lets say a person is registered for a church called Church 1...I want to search for the Church 1 location, then all the people who are registered for that location comes up row by row. Then I can select which day each person picked up food and what type of food they picked up...and click submit. Then I'll run a query against my database to add this information.
The big deal I guess is that instead of making a form for each person (for each row), I just make one form and when the form is submitted everyone will be added to the "pickup" table with the appropriate day and item they picked up.
I would suggest you look at the form API's built-in AHAH support. You can find more information here: http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.html/6#ahah. Assuming I understand your question correctly, this is a fairly typical ajax/ahah form situation; an element in your form triggers the creation of new form elements.
For example, you can create a select box of locations. Once a location is selected (#ahah['event'] => 'change'), you can make a callback to a menu location (#ahah['path'] => path/to/callback) which can generate the new form elements to add, in this case select boxes for the persons and/or packages associated with that location.
You could also do something similar using search instead of a select element.

Edit and create nodes in a view?

We are storing people's class attendance information to Drupal. We would like to show this in a grid/chart, where the first column of each row shows person's name, and rest of the columns (ca. 20) either a checkbox or "X" if the user attended a class, or otherwise an non-checked box or empty column:
(dates here)
Jack X XXX X X
Jill XX XXX XX
It should also be possible to edit the attendance information on the grid. Each attendance information is a node of its own.
This functionality can probably mostly be achieved using views and editablefields, but there is one problem: if a person has not attended a specific class he/she will not have at all an attendace node for that day. What would be the easiest way to create an attendace node in those cases, so that it would be possible for the end user to edit the grid by just clicking on the checkbox or typing an 'X'?
You could use the Rules module to automatically create the nodes.
I'm not quite sure about the functionality you want to achieve, but it sounds like a doodle like one. So you may want to check out the http://drupal.org/project/date_picker_formatter module (successor of http://drupal.org/project/dudel).

Resources