<PrimerBrandCTAForm ButtonLabel="Get Updates" OnSubmit="HandleSubmit">
<InputBlock>
<PrimerBrandFormControl Label="Email address" For="email" IsRequired="true" IsFullWidth="true">
<PrimerBrandTextInput Type="email" Placeholder="email@outlook.com" FullWidth="true"></PrimerBrandTextInput>
</PrimerBrandFormControl>
</InputBlock>
<ConfirmBlock>
<PrimerBrandFormControl IsCheckbox="true" For="agree" Label="I agree to the terms" Value="@Agreed" ValueChanged="v => Agreed = v" />
</ConfirmBlock>
</PrimerBrandCTAForm>
Available parameters for the CTAForm component
Name | Description | Default Value | CSS Class |
---|---|---|---|
InputBlock | Main input area (e.g., email field) | null | CTAForm-input |
ConfirmBlock | Optional confirmation section (e.g., checkbox) | null | CTAForm-confirm |
ButtonLabel | Text label of the submit button | "Subscribe" | CTAForm-button |
OnSubmit | Callback executed when form is submitted | null | - |
Available parameters for the FormControl component
Name | Description | Default Value | CSS Class |
---|---|---|---|
Label | Label text for the field | null | FormControl-label |
For | ID of the related input element | null | for attribute |
IsRequired | Whether the field is required | false | - |
IsCheckbox | Render input as checkbox | false | FormControl--checkbox |
IsFullWidth | Expands control to full width | false | FormControl--fullWidth |
IsBordered | Adds border around control | false | FormControl--border |
Hint | Additional hint text | null | FormControl-hint |
ValidationMessage | Validation error or success message | null | FormControl-validation |
IsInvalid / IsSuccess | Style for error or success state | false | FormControl-validation--error/success |
Value / ValueChanged | Binding for checkbox state | false | - |