Examples / Fill in forms
Human answers take priority
If the person changes a field and then rewrites their request, the AI updates its own answers but leaves the person's changes alone.
Agent Input, part of the UAG's browser library @formio/uag-js, fills the form from what the person writes in Describe your request, and fills it again whenever they rewrite it. Each time, it updates only the fields it filled itself and the ones still empty. A field the person typed in, picked or corrected belongs to them: it is never overwritten, and the AI does not answer it again.
The same holds when the AI is unsure and offers options (see Leave unsure answers to the person): once the person picks one, it is theirs.
Try it: pick the first sample, change the Name field, then pick the second sample. The email, topic and subject change to match the new text; the name stays as you typed it.
Turn it on
{
"title": "Example: Human answers take priority",
"name": "exampleHumanAnswersPriority",
"path": "example-human-answers-priority",
"type": "form",
"display": "form",
"tags": [
"uag"
],
"properties": {
"description": "A general request: who sent it, how to reach them, and what it is about."
},
"components": [
{
"type": "textarea",
"key": "description",
"label": "Describe your request",
"input": true,
"placeholder": "Tell us what you need, in your own words.",
"rows": 4,
"validate": {
"required": true
},
"properties": {
"uag": "fill",
"uagField": "input"
}
},
{
"type": "textfield",
"key": "name",
"label": "Name",
"input": true,
"properties": {
"uag": "fill"
}
},
{
"type": "email",
"key": "email",
"label": "Email",
"input": true,
"properties": {
"uag": "fill"
}
},
{
"type": "select",
"key": "topic",
"label": "Topic",
"input": true,
"dataSrc": "values",
"data": {
"values": [
{
"label": "Question",
"value": "question"
},
{
"label": "Problem",
"value": "problem"
},
{
"label": "Request",
"value": "request"
},
{
"label": "Feedback",
"value": "feedback"
}
]
},
"properties": {
"uag": "fill"
}
},
{
"type": "textfield",
"key": "subject",
"label": "Subject",
"input": true,
"properties": {
"uag": "fill"
}
},
{
"type": "button",
"key": "submit",
"label": "Submit",
"action": "submit",
"input": true
}
]
}<link rel="stylesheet" href="https://ai.form.io/uag-js/uag-js.css">
<script src="https://cdn.jsdelivr.net/npm/@formio/js@5.6.1/dist/formio.full.min.js"></script>
<!-- Registers @formio/uag-js with this UAG: forms tagged uag save through it, and get Agent Input and the chat. -->
<script src="https://ai.form.io/uag-js/uag.use.js"></script>
<div id="form"></div>
<script>
Formio.createForm(document.getElementById('form'), 'https://uag.form.io/example-human-answers-priority');
</script>Try it
Start the live examples
The examples call real models. Starting them signs you in as a temporary guest of the examples' project, for every example; what you enter is deleted after a day.
Not supported without a license
This demo needs a license (LICENSE_KEY) that includes the UAG, or a 30-day free trial project on portal.form.io. This deployment has neither: it serves an Open Source project, or its UAG is unlicensed.
The chat widget examples work everywhere, with no license.