Completed
Last Updated: 14 Nov 2024 09:27 by ADMIN
Release 7.0.0

My Nullable DateOnly field shows as 1/1/2001 - I would expect it to be a more sensible default. The problem applies to all autogenerated DatePickers (like the Grid's filter DatePicker and the Form). The same issue is applicable to the TimeOnly struct.

 

===ADMIN EDIT===

In the interim, as a viable workaround, you can utilize the FormItem Template and declare a TelerikDatePicker like this:

@using System.ComponentModel.DataAnnotations

<TelerikForm Model="@PersonModel">
    <FormValidation>
        <DataAnnotationsValidator></DataAnnotationsValidator>
    </FormValidation>
    <FormItems>
        <FormItem>
            <Template>
                <label for="country">Date of Birth:</label>
                <TelerikDatePicker @bind-Value="@PersonModel.DOB" Width="200px" />
            </Template>
        </FormItem>
    </FormItems>
</TelerikForm>

@code {
    private Person PersonModel { get; set; } = new Person() { DOB = null };

    public class Person
    {
        [Display(Name = "Date of Birth")]
        public DateOnly? DOB { get; set; }
    }
}

 

Completed
Last Updated: 09 Oct 2024 11:21 by ADMIN
Created by: Stewart
Comments: 4
Category: Form
Type: Bug Report
1

Hi, 

I came across some unusual behaviour

I wanted to hide the default form submit button so I could put it elsewhere on the page but once I had an empty FormButton element on the page I was unable to print any more

<FormButtons></FormButtons>

a solution to my problem was to put an empty span in the element

<FormButtons><span></span></FormButtons>

Completed
Last Updated: 25 Sep 2024 11:05 by ADMIN
Created by: Bernd
Comments: 4
Category: Form
Type: Feature Request
0

I often have the scenario where I need to switch from the autogenerated formitem to a templated version. Mostly because I need a different editor

For example:

<FormItem Field="@nameof(KeyValuesViewModel.Workplace)" LabelText="Workplace" EditorType="@FormEditorType.TextBox"/>

I create something like this:

            <FormItem>
                <Template>
                    <label for="WorkplaceInput">Workplace</label>
                    <TelerikMaskedTextBox Id="WorkplaceInput" Mask="aa aaaaaa" Enabled=@WorkplaceEnabled OnChange="OnWorkplaceChanged" @ref=@WorkplaceTextBoxRef />
                    <TelerikValidationMessage For="@(() => KeyValuesViewModel.Workplace)" />
                </Template>
            </FormItem>

It would speed up things if I just could use the "light bulb" and convert it. Instead coding it manually, copy, paste, edit the copied version. Over and over again.

Completed
Last Updated: 18 Apr 2024 11:41 by ADMIN
Release 2024 Q2 (May)
Created by: Mike
Comments: 1
Category: Form
Type: Bug Report
0

When I assign an Id to a FormGroup in TelerikForm, it's value can be seen in code, but neither the attribute nor it's value get rendered.

 

<TelerikForm Model="@TestUser"
                     OnValidSubmit="@HandleValidSubmit"
                     OnInvalidSubmit="@HandleInvalidSubmit">
            <FormValidation>
                <DataAnnotationsValidator></DataAnnotationsValidator>
            </FormValidation>
            <FormItems>
                <FormGroup LabelText="User Information" Id="userinfo">
                    <FormItem Field="@nameof(User.FirstName)"></FormItem>
                    <FormItem Field="@nameof(User.LastName)"></FormItem>
                    <FormItem Field="@nameof(User.Email)">
                        <Template>
                            <label for="mail" class="k-label k-form-label">Email*:</label>
                            <TelerikTextBox Id="mail" @bind-Value="@TestUser.Email" InputMode="email" Placeholder="example@domain.com"></TelerikTextBox>
                            <TelerikValidationMessage For="@(() => TestUser.Email)"></TelerikValidationMessage>
                        </Template>
                    </FormItem>
                    <FormItem Field="@nameof(User.Password)">
                        <Template>
                            <label for="pass" class="k-label k-form-label">Password*:</label>
                            <TelerikTextBox Id="pass" @bind-Value="@TestUser.Password" Password="true"></TelerikTextBox>
                            <TelerikValidationMessage For="@(() => TestUser.Password)"></TelerikValidationMessage>
                        </Template>
                    </FormItem>
                    <FormItem Field="@nameof(User.BirthDate)" />
                    <FormItem Field="@nameof(User.AcceptTerms)" />
                </FormGroup>
                <FormGroup LabelText="Shipping Address" Id="shipaddress">
                    <FormItem LabelText="Country*: " Field="@nameof(User.Country)" />
                    <FormItem LabelText="City*: " Field="@nameof(User.City)" />
                    <FormItem LabelText="Address Line*: " Field="@nameof(User.AddressLine)" />
                    <FormItem LabelText="Second Address Line: " Field="@nameof(User.AddressLine2)" />
                </FormGroup>
            </FormItems>
        </TelerikForm>
Completed
Last Updated: 04 Apr 2024 15:40 by Chris
Release 4.2.0 (04/26/2023)
Created by: Stewart
Comments: 16
Category: Form
Type: Bug Report
19

When I updated to the latest version I noticed that the FormItems in AuthorizedViews were moved to the bottom of the form, Quick example:

<TelerikForm>
    <FormItems>
        <AuthorizeView>
            <Authorized>
                <FormItem Field="First"/>
            </Authorized>
        </AuthorizeView>
        <FormItem Field="Second"/>
    </FormItems>
</TelerikForm>

will end up like

<TelerikForm>
    <FormItems>
        <FormItem Field="Second"/>
        <FormItem Field="First"/>
    </FormItems>
</TelerikForm>

Completed
Last Updated: 06 Jun 2023 13:29 by ADMIN
Created by: Peter
Comments: 1
Category: Form
Type: Bug Report
0

https://docs.telerik.com/blazor-ui/components/form/formitems/formitemstemplate

Render defined Form items inside a FormItemsTemplate  Example

Line 22 has @nameof(Person.Id) which generates an error, should be without the @ as shown below.


 <TelerikFormItemRenderer Item="@( formItems.First(x => x.Field == nameof(Person.Id)) )" />


 

Completed
Last Updated: 15 Mar 2023 08:31 by ADMIN
Release 4.1.0 (15/03/2023)

Here is a TelerikForm with a FormItem (1) for a boolean field. Another FormItem (2) should render, depending on the boolean field (1). This does not work with a TelerikForm, but works with a standard EditForm.

The workaround for a TelerikForm is to use a FormItem Template with a TelerikCheckBox. This is demonstrated below as well.

<EditForm Model="@_data">
    <label>Condition 1 (InputCheckbox):</label>
    <InputCheckbox @bind-Value="@_data.Value1" />
    <br />
    @if (_data.Value1)
    {
        <label>Result 2</label>
        <InputCheckbox DisplayName="Result 2:" @bind-Value="@_data.Value2"></InputCheckbox>
    }
</EditForm>

<h1>TelerikForm</h1>

<TelerikForm Model="@_data">
    <FormItems>
        <FormItem LabelText="Condition 1 (FormItem):" Field="@nameof(_data.Value1)"></FormItem>
        <FormItem>
            <Template>
                <label for="x">Condition 1 (TelerikCheckBox):</label>
                <br />
                <TelerikCheckBox Id="x" @bind-Value="_data.Value1" />
            </Template>
        </FormItem>
        @if (_data.Value1)
        {
            <FormItem LabelText="Result 2:" Field="@nameof(_data.Value2)"></FormItem>
        }
    </FormItems>
</TelerikForm>

@code {
    private ExampleDto _data { get; set; } = new ExampleDto();

    public class ExampleDto
    {
        public string TextValue { get; set; }
        public bool Value1 { get; set; }
        public bool Value2 { get; set; }
    }
}

Completed
Last Updated: 09 Mar 2023 14:25 by ADMIN
Release 4.1.0 (15/03/2023)
I would like to use manually declared and autogenerated fields together as in the Grid with the autogenerated columns.
Completed
Last Updated: 03 Mar 2023 07:26 by ADMIN
Release 4.1.0 (15/03/2023)
I am using a Grid inside a Form. When I click a page number button inside the Pager, the Form is submitted.
Completed
Last Updated: 24 Feb 2023 20:47 by ADMIN
Release 4.1.0 (15/03/2023)
Completed
Last Updated: 06 Dec 2022 09:39 by ADMIN
Release 4.0.0 (18 Jan 2023) (R1 2023)
Created by: Douglas
Comments: 0
Category: Form
Type: Feature Request
11
It will be beneficial to have an event that is fired on update of the Model. Currently, the only workaround is to use the FieldChanged event of the EditContext.
Completed
Last Updated: 30 May 2022 11:02 by ADMIN
Release 3.4.0
Created by: Marc Simkin
Comments: 0
Category: Form
Type: Feature Request
5
I want to be able to style some of its elements in a specific way and I cannot target them at the moment.
Completed
Last Updated: 11 Apr 2022 13:23 by ADMIN
Release 3.2.0

As per the current component configuration, when the EditContext changes, the Form descendants are not disposed and recreated. Thus when the change occurs, you need to explicitly add any validation (be that DataAnnotationsValidation or custom one).

This request serves for indicating research on how the Form behavior could be improved upon changing the EditContext.

Completed
Last Updated: 11 Apr 2022 11:51 by ADMIN
Release 3.2.0

The Validation does not trigger when I load my model from an async method.

 

<AdminEdit>

A workaround for the time being:

@inject HttpClient http
@using System.ComponentModel.DataAnnotations

<TelerikForm @ref="@EditForm" 
             Model="@TheCatFactTelerik" 
             ValidationMessageType="@FormValidationMessageType.None">
    <FormValidation>
        <ValidationSummary />
    </FormValidation>
    <FormItems>
        <FormItem Field="fact">
        </FormItem>
    </FormItems>
    <FormButtons>
        <TelerikButton ButtonType="ButtonType.Submit" Primary="true">Apply</TelerikButton>
    </FormButtons>
</TelerikForm>

@code {
    public TelerikForm EditForm { get; set; }

    public CatFact TheCatFactTelerik = new CatFact();

    public EditContext editContext { get; set; }

    protected async override Task OnInitializedAsync()
    {
        TheCatFactTelerik = await http.GetFromJsonAsync<CatFact>("https://catfact.ninja/fact");
    }

    protected override async Task OnAfterRenderAsync(bool firstRender)
    {
        EditForm.EditContext.AddDataAnnotationsValidation();
    }

    public class CatFact
    {
        [Required(ErrorMessage = "Required Error Text")]
        [MinLength(10, ErrorMessage = "Min Length 10")]
        public string fact { get; set; }
        public int length { get; set; }
    }
}

</AdminEdit>

Completed
Last Updated: 24 Feb 2022 19:21 by ADMIN
Release 3.1.0

Telerik TextBox for string is nice but what about something like [DataType(DataType.MultilineText)] for TextArea?

Forms should really come with Text Area.  It seems like a good one to do next.


Blazor Form Overview | Telerik UI for Blazor

---

ADMIN EDIT

An idea is that perhaps other data type annotations could be used - perhaps Date, DateTime, TIme can switch different date/time pickers, Html can generate the HTML editor, Password can set a textbox with the Password type

---

Completed
Last Updated: 30 Aug 2021 05:16 by ADMIN
Created by: Marcus
Comments: 1
Category: Form
Type: Feature Request
3

I need a way to use TelerikForms and make it responsive for various display sizes.

Here is what I'm trying to accomplish: I have a TelerikForm with 5 columns. it looks nice horizontally on the screen, but I need it to respond to screen size and start stacking vertically when the screen is shrunk.