Setting the required indicator on a Spark FomItem container in Flex Hero

The following example shows how you can set the required indicator on a Spark FormItem container in Flex Hero by setting the required property.

The following example(s) require Flash Player 10 and the beta Adobe Flex Hero SDK. To download the Adobe Flash Builder 4 trial, see To download the latest nightly build of the Flex Hero SDK, see

<?xml version="1.0" encoding="utf-8"?>
<!-- -->
<s:Application name="Spark_FormItem_required_test"
        <s:VerticalLayout horizontalAlign="center" verticalAlign="middle" />
    <s:Form id="frm" defaultButton="{submitBtn}" backgroundColor="#EEEEEE">
        <s:FormHeading label="Spark Form Heading" backgroundColor="haloSilver" />
        <s:FormItem sequenceLabel="1." label="Username:" required="true">
                <s:Label text="" />
            <s:TextInput id="username" />
        <s:FormItem sequenceLabel="2." label="Password:" required="true">
                <s:Label text="weak" color="red" />
            <s:TextInput id="password1" displayAsPassword="true" />
        <s:FormItem sequenceLabel="3." label="Confirm password:">
                    <s:Label text="One" color="red" />
                    <s:Label text="Two" color="blue" />
            <s:TextInput id="password2" displayAsPassword="true" />
                <s:HorizontalLayout />
            <s:Button id="resetBtn" label="Reset" />
            <s:Button id="submitBtn" label="Submit" />

This entry is based on a beta version of the Flex Hero SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex Hero SDK.

2 thoughts on “Setting the required indicator on a Spark FomItem container in Flex Hero

  1. This line giving me error :

    Description Resource Path Location Type
    Could not resolve to a component implementation. EXAMPLE.mxml /EXAMPLE/src line 11 Flex Problem

    There is a mx:Form is exists but s:?

    Adobe Flash Builder 4

Comments are closed.