Why does the telerik.com react site only have input controls in the form?
Input controls are not always in the input form. Your example is too narrow.
I want to put a label inside the input form. It is a control type with an initial value linked.
Can you edit the source from the link below?
thank you
Input controls are not always in the input form. Your example is too narrow.
I want to put a label inside the input form. It is a control type with an initial value linked.
Can you edit the source from the link below?
thank you
https://stackblitz.com/edit/react-bbc32g?file=app%2Fmain.tsx
Hi, Won Bae Jung,
I have edited your example to include Label components inside the form fields:
https://stackblitz.com/edit/react-bbc32g-t1pbsk?file=app%2Fmain.tsx
In the email field, the `InputWithLabel` custom component is passed to the component prop, which renders an Input and a Label. The initial value of the label is passed to the fieldRenderProps.
In the third field, only a Label is rendered, and the value passed is from the `initialValues`, like the example of the Input.
If you want to render a Label component directly to the component prop similar to the Input, the label value should be passed to the children prop.
<Field
name={"field name"}
component={Label}
children={"label value"}
/>
The Form Field allows passing any component to its component property such as a Label, TextArea, or a custom-made component.
For more information about Labels inside the Form, please refer to this article:
https://www.telerik.com/kendo-react-ui/components/form/labels/
I hope this matches what you need, please let us know if you have any further questions.
Regards,
Wissam
Progress Telerik