All Collections
The Cargosnap platform
Forms
Hidden fields, or "Conditional fields"
Hidden fields, or "Conditional fields"

CargoSnap forms are more than just forms! Using the 'conditional field' features, you can steer any inspection to be incredibly efficient!

Updated over a week ago

Conditional fields are applicable in almost any situation when you apply forms but want to keep the form short at the same time. Let me sketch it with a short container example.

Suppose you need to inspect an incoming container for cleanness. Well, if it is clean, that would just mean a simple single question, right?

But now, when the container is in fact dirty, there is more you want to know. So you may ask some follow-on questions in that case. For example, is it wet or dry dirt? And if it is dry dirt, is it sand or some kind of chemical?

You could of course add all those questions to a form (just like in a paper form), but this will also make the form very long.

So, here the "Conditional fields" come in! Let's go ahead and build this form with the above example :-)

  1. To start with, build a form with different Field Types.

  2. Locate to the field where you would like to apply possible conditions (conditional fields) - in this case - "is the container dirty?"

  3. Then add a new field, where one can select "Contamination type" when the container is dirty, and add the 3 types of contamination we determined to be required (wet, dry and odor).

4. Now comes the key solution: at the bottom of the field, tick the option "Hidden (Conditional field)" and a small window will pop out. Under "Show when:", choose the field that you wanted to ask conditional follow-on questions (in this case: "is the container dirty?")

5. Define with what answer (in this case, yes), this follow-on question (in this case, "Contamination type") will show.

6. "Save condition" to confirm.

There are different Field types in our forms, and you can set Conditions on the following types:

  • Number fields: set conditions if "Less than, Greater than, Equal to"

  • Text fields: set conditions if an answer contains a certain word

  • Select fields: set conditions if an answer contains a specific choice

  • Checkbox: set conditions if it was ticked or not

That is it! Let's save the form and see what it does on the app (remember to reload settings) :

Nifty!

Now, with this you can build forms with the most incredible functionality. Simple, but very powerful!

Relevant articles:

Did this answer your question?