x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<form action="#" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="fxnc_PUKTtD0Wbi336CSvC_QJ6K3Xgtjp5Pf_xGb_z1Q_90MCHd6-Lh1sKrCjR_HAGF6bO7KTpi9-m4bcKM3wg" />
<div class="field field--contact_type radio_buttons">
<fieldset><legend>How can we help?</legend>
<div class="radio_buttons" data-controller="custom-radio">
<span class="radio">
<label for="contact_type_general">
<input id="contact_type_general" type="radio" value="general" name="lookbook_input_preview[contact_type]" />
General enquiry
</label>
</span>
<span class="radio">
<label for="contact_type_feedback">
<input id="contact_type_feedback" type="radio" value="feedback" name="lookbook_input_preview[contact_type]" />
Feedback
</label>
</span>
<span class="radio">
<label for="contact_type_complaint">
<input id="contact_type_complaint" type="radio" value="complaint" name="lookbook_input_preview[contact_type]" />
Complaint
</label>
</span>
</div>
</fieldset>
</div>
</form>
1
2
3
4
5
6
7
effective_required = required || error
effective_value = error ? "none" : value
field = effective_required ? FIELD.merge("required" => true) : FIELD
attrs = (effective_value && effective_value != "none") ? { FIELD["name"].to_sym => effective_value } : {}
model = build_input_preview_model(schema: [ field ], **attrs)
model = with_validation_errors(model) if error
render_input_preview(field:, model:, disabled:)
Param Description Input

No Figma design linked. Add @figma_node_id <id> (or @figma <url>) to the preview class or scenario docstring.