[CLOSED] Mandatory fields in FormPanel expand when with specified Width and IndicatorText declared

  1. #1

    [CLOSED] Mandatory fields in FormPanel expand when with specified Width and IndicatorText declared

    Hello,

    I have posted before this problem before, but didn't actually really understand what was the problem.

    When I create a TextField inside a FormPanel and assign to it a Width and a IndicatorText (like "*"), if it is not valid the TextField will enlarge its size...

    I create an example page, so that you can replicate the problem:

    <html xmlns="http://www.w3.org/1999/xhtml"><head runat="server">
        <title>Mandatory FormPanel Fields problem</title>
    </head>
    <body>
        <form id="form1" runat="server">
            <ext:ResourceManager ID="ManagementResourceManager" runat="server">
            </ext:ResourceManager>
            <ext:Viewport ID="Viewport1" runat="server" Layout="BorderLayout">
                <Items>
                    <ext:Panel runat="server" Split="true" Layout="AutoLayout" Region="Center">
                        <Items>
                            <ext:FormPanel ID="FormPanel1" runat="server" Title="No specified width" Hidden="false" Frame="true" Width="500" Margins="0 2 0 2" MonitorValid="true">
                                <Defaults>
                                    <ext:Parameter Name="msgTarget" Value="side" Mode="Value" />
                                    <ext:Parameter Name="AutoFitErrors" Value="false" Mode="Raw" />
                                    <ext:Parameter Name="AllowBlank" Value="false" Mode="Raw" />
                                </Defaults>
                                <Items>
                                    <ext:TextField ID="document_type_input_name" runat="server" FieldLabel="Name" IndicatorText="*" />
                                    <ext:TextField ID="document_type_input_description" runat="server" FieldLabel="Description" IndicatorText="*" />
                                </Items>
                            </ext:FormPanel>
                            <ext:FormPanel ID="FormPanel2" runat="server" Title="Specified width" Hidden="false" Frame="true" Width="500" Margins="0 2 0 2" MonitorValid="true">
                                <Defaults>
                                    <ext:Parameter Name="msgTarget" Value="side" Mode="Value" />
                                    <ext:Parameter Name="AutoFitErrors" Value="false" Mode="Raw" />
                                    <ext:Parameter Name="AllowBlank" Value="false" Mode="Raw" />
                                </Defaults>
                                <Items>
                                    <ext:TextField ID="TextField1" runat="server" FieldLabel="Name" IndicatorText="*" AnchorHorizontal="95%"  />
                                    <ext:TextField ID="TextField2" runat="server" FieldLabel="Description" IndicatorText="*" AnchorHorizontal="95%" />
                                </Items>
                            </ext:FormPanel>
                        </Items>
                    </ext:Panel>
                </Items>
            </ext:Viewport>
    
    
        </form>
    </body>
    </html>
    Why does it only happens when the TextField has a Width declared (or if it has an AnchorHorizontal) ?

    Thanks in advance for the answer.
    Last edited by fabricio.murta; Sep 17, 2016 at 12:31 AM. Reason: no user feedback for 7+ days
  2. #2
    Hello Peter!

    As for this specific behavior when using indicator, we have a very similar issue logged about this under #892 but its workarounds don't seem to work in your case. The original forum thread is Radio Button indicator issue.

    Thanks for reporting it on 4.x. For this specific validation-related case we logged an issue under #1369. This thread will be updated as soon as we fix this problem for good.

    Workarounds that might just work for you:
    - do not use IndicatorText, but append the '*' to the field's label (the asterisk will then be in the field's label not field input frame)
    - use a MsgTarget setting different than side which triggers the condition to hide the indicator text.
    Fabrício Murta
    Developer & Support Expert
  3. #3
    Hello Peter!

    We didn't hear back from you regarding this issue for some days already. I wonder whether you still need assistance with this?
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. [CLOSED] Mandatory fields expand when not filled correctly
    By Peter.Treier in forum 4.x Legacy Premium Help
    Replies: 5
    Last Post: Aug 09, 2016, 5:41 PM
  2. [CLOSED] ComboBox on FormPanel - mark as mandatory
    By Peter.Treier in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 05, 2014, 6:37 AM
  3. Gridpanel design for data with mandatory fields
    By madeofrose in forum 2.x Help
    Replies: 0
    Last Post: Sep 05, 2012, 7:26 AM
  4. Replies: 32
    Last Post: Nov 17, 2010, 12:08 PM
  5. [CLOSED] [1.0] Get all mandatory fields always in red
    By juane66 in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 27, 2010, 2:14 PM

Posting Permissions