Hello! I'm testing the demo UI node (<https://gith...
# talk-kratos
r
Hello! I'm testing the demo UI node (https://github.com/ory/kratos-selfservice-ui-node/), and I'm not finding anywhere how the submit input sets the attribute formnovalidate. This is the page in /recovery right after putting in the email to recover. This is currently how I'm rendering (non OIDC) submit buttons:
Copy code
<button class="button button--main" {...node.attributes}>{node.meta.label?.text}</button>
The UI renders out to
Copy code
<div class="ui s-hey5M-KtjxHz">
	<p class="message info s-hey5M-KtjxHz">An email containing a recovery code has been sent to the email address you provided. If you have not received an email, check the spelling of the address and make sure to use the address you registered with.</p>
	<input name="csrf_token" type="hidden" value="1G2L+qsK72Bstr2dtGufFR1qI5jJ9jHek9vJ8DshKRBkQnZ9F8pPGBi/0Zpr+EgOiuCiCdAnA664jPQatdXJeQ==" required="" node_type="input" class="s-hey5M-KtjxHz"/>
	<input placeholder="Recovery code" name="code" type="text" required="" node_type="input" class="s-hey5M-KtjxHz"/>
	<input name="method" type="hidden" value="code" node_type="input" class="s-hey5M-KtjxHz"/>
	<button class="button button--main s-hey5M-KtjxHz" name="method" type="submit" value="code" node_type="input">Submit</button>
	<button class="button button--main s-hey5M-KtjxHz" name="email" type="submit" value="mike@email.com" node_type="input">Resend code</button>
</div>
and this is the JSON that Kratos gives me
Copy code
{
  "action": "<https://dev.server.com/auth/self-service/recovery?flow=09065571-4541-4798-8368-8c0fed15a269>",
  "method": "POST",
  "nodes": [
    {
      "type": "input",
      "group": "default",
      "attributes": {
        "name": "csrf_token",
        "type": "hidden",
        "value": "1G2L+qsK72Bstr2dtGufFR1qI5jJ9jHek9vJ8DshKRBkQnZ9F8pPGBi/0Zpr+EgOiuCiCdAnA664jPQatdXJeQ==",
        "required": true,
        "disabled": false,
        "node_type": "input"
      },
      "messages": [],
      "meta": {}
    },
    {
      "type": "input",
      "group": "code",
      "attributes": {
        "name": "code",
        "type": "text",
        "required": true,
        "disabled": false,
        "node_type": "input"
      },
      "messages": [],
      "meta": {
        "label": {
          "id": 1070010,
          "text": "Recovery code",
          "type": "info"
        }
      }
    },
    {
      "type": "input",
      "group": "code",
      "attributes": {
        "name": "method",
        "type": "hidden",
        "value": "code",
        "disabled": false,
        "node_type": "input"
      },
      "messages": [],
      "meta": {}
    },
    {
      "type": "input",
      "group": "code",
      "attributes": {
        "name": "method",
        "type": "submit",
        "value": "code",
        "disabled": false,
        "node_type": "input"
      },
      "messages": [],
      "meta": {
        "label": {
          "id": 1070005,
          "text": "Submit",
          "type": "info"
        }
      }
    },
    {
      "type": "input",
      "group": "code",
      "attributes": {
        "name": "email",
        "type": "submit",
        "value": "mike@email.com",
        "disabled": false,
        "node_type": "input"
      },
      "messages": [],
      "meta": {
        "label": {
          "id": 1070008,
          "text": "Resend code",
          "type": "info"
        }
      }
    }
  ],
  "messages": [
    {
      "id": 1060003,
      "text": "An email containing a recovery code has been sent to the email address you provided. If you have not received an email, check the spelling of the address and make sure to use the address you registered with.",
      "type": "info",
      "context": {}
    }
  ]
}
Am I missing something? Do I just have the whole concept wrong to where each group should be a separate form element?
r
r
Thank you Mia!