GET /api/v2/prompts/signup-id/partials# response# success code: 200# not found code: 404body: { "signup-id": { "form-content-start": "<div>HTML or Liquid</div>...", "form-content-end": "<div>HTML or Liquid</div>..." }}
<div class="ulp-field"> <label for="comments">Comments</label> <textarea type="text" name="ulp-comments" id="comments"></textarea> <div class="ulp-error-info"> Please provide an answer. </div></div>
チェックボックス要素 チェックボックスフィールドの事前設定スタイル
Report incorrect code
Copy
Ask AI
<div class="ulp-field"> <input type="checkbox" name="ulp-terms-of-service" id="terms-of-service"> <label for="terms-of-service"> I agree to the <a href="#">Terms of Service</a> </label> <div class="ulp-error-info"> Please agree to the Terms of Service. </div></div>
電話番号の検証 クライアント側の電話番号の検証
Report incorrect code
Copy
Ask AI
// Validation Function<script> function validatePhoneFunction(element, formSubmitted) { if (!formSubmitted) { return true; } return element.value.replace(/\D/g, '').length === 10; }</script>// Custom Input Field including the validation error HTML<div class="ulp-field"> <label for="ulp-field-phone">Phone Number</label> <input type="text" name="ulp-field-phone" id="ulp-field-phone"> <div class="ulp-error-info" data-ulp-validation-function="validatePhoneFunction" data-ulp-validation-event-listeners="blur,change,input,focus"> Invalid phone number </div></div>
Screen Reader Validation Validation for accessible error messages
Report incorrect code
Copy
Ask AI
<script> function requiredTextFunction(element, formSubmitted) { if (!formSubmitted) return true; return element.value.trim().length > 0; }</script><div class="ulp-field"> <label for="ulp-phone">Phone Number</label> <input type="text" id="ulp-phone" name="ulp-field-phone" aria-describedby="error-phone-required" aria-invalid="true" required > <div id="error-phone-required" class="ulp-error-info" role="alert" data-ulp-validation-function="requiredTextFunction" data-ulp-validation-event-listeners="change" > Phone number is required </div></div>
# PUT /api/v2/prompts/signup-id/custom-text/en{ "signup": { "var-tos": "I agree with the [Terms of Service](https://en.example.com/tos)" }}# PUT /api/v2/prompts/signup-id/custom-text/es{ "signup": { "var-tos": "Estoy de acuerdo con los [Términos de Servicio](https://es.example.com/tos)" }}
カスタムテキスト変数は、prompts.screen.textオブジェクトを使用して、パーシャルで参照されます。前のセクションで示したvar-tosの例に対する参照は、prompt.screen.texts.varTosです。Signup ID Prompt,(サインアップIDプロンプト)のパーシャルで前に作成した変数を使用する方法の例については、以下を参照してください。Management APIのvar-tos変数がパーシャルでvarTosとして参照されることに注意します。