x
1
2
3
4
5
6
<form class="usa-form" id="new_text_input_component_preview_article" action="#" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="gBWOb58oQk0JKUEdvft1SkdqjLRO8lzItMALZgMDVmmmaTzHe0RfSNOA3L9tlvX_2d9lNodTA0D3yvFWgpA-Vw" autocomplete="off" />
<div class=''>
<label class="usa-label" for="text_input_component_preview_article_title">Title</label>
<input class="usa-input" type="text" name="text_input_component_preview_article[title]" id="text_input_component_preview_article_title" />
</div>
</form>
1
2
3
4
5
6
7
8
9
10
-# haml-lint:disable LineLength
- article = UswdsComponents::TextInputComponentPreview::Article.new(title: params[:value])
-# haml-lint:enable LineLength
- article.errors.add(:title, params[:error1]) if params[:error1].present?
- article.errors.add(:title, params[:error2]) if params[:error2].present?
= form_for article, url: '#', html: { class: 'usa-form' } do |f|
= render UswdsComponents::TextInputComponent.new(form: f, attribute: :title,
hint: params[:hint], success: params[:success])
Param Description Input