Home > Adobe Flex > Flex Required Field Indicator

Flex Required Field Indicator

Ever wanted to create your own textual component that sits outside of a Flex Form (and FormItem tag) that still uses the same required field indicator?

After trying to duplicate the little red asterisk using styles or even creating my own graphically, I opted to use the same one that comes part of the Flex SDK inside Assets.swf:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?xml version="1.0" encoding="utf-8"?>
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml"
    horizontalGap="0" verticalAlign="middle" horizontalAlign="right" 
    height="18" width="100%"
    paddingBottom="0" paddingTop="0"
    styleName="requiredFieldLabel">
 
	<mx:Image 
	    source="@Embed(source='Assets.swf',symbol='mx.containers.FormItem.Required')" 
	    height="7"/>
 
	<mx:Label text="indicates required field" 
	    styleName="requiredFieldLabel"/>
 
</mx:HBox>

Here’s what you’d see:
required_field

Categories: Adobe Flex Tags:
  1. February 28th, 2009 at 00:16 | #1

    Thank you!

  2. March 14th, 2009 at 06:21 | #2

    This is the first time I commented here and I must say that you give us genuine, and quality information for other bloggers! Great job.
    p.s. You have a very good template for your blog. Where did you find it?

  3. August 27th, 2009 at 15:26 | #4

    Hi!

    How can I do to make the red asterisk appear to the right of an input text box in flex?

    Regards

    • September 15th, 2009 at 11:50 | #5

      Easy…just swap the Image and Label tags. Since they both reside inside of an HBox (horizontal box), the first tag listed will appear left-most on the screen. So you want to write this instead:

  4. Alejandro
    January 7th, 2011 at 10:16 | #6

    Hi, I think that your example could Work for me but I dont understand how to use it. Can you explain to me. I need to indicate in all my requiered fields using an asterisk but I can´t use a form.
    Thanks

  5. DSL
    November 20th, 2013 at 07:09 | #7

    Thanks a lot…..

  6. June 22nd, 2020 at 04:57 | #8

    Really informative blog.Much thanks again. Really Cool. free sex gifs

  7. June 22nd, 2020 at 06:19 | #9

    I view something really special in this internet site.

  8. June 26th, 2020 at 02:50 | #10

    Thanks so much for the blog.Really thank you! Will read on

  9. June 29th, 2020 at 06:14 | #11

    this is actually the fourth time i read the blog, good article as always! regards, Samui First House Hotel

  10. July 8th, 2020 at 10:25 | #12

    This blog is without a doubt entertaining additionally factual. I have found many useful stuff out of this source. I ad love to return again and again. Thanks a lot!

  11. July 19th, 2020 at 11:01 | #13

    Thanks a lot for this kind of details I had been exploring all Yahoo to locate it!

  12. August 6th, 2020 at 09:25 | #14

    of course, study is paying off. Is not it good whenever you uncover an excellent article? My personal internet searching seem full.. thank you. Great ideas you have got here..

  13. August 10th, 2020 at 03:51 | #15

    Thanks for sharing, this is a fantastic post.Really thank you! Really Cool.

  14. August 17th, 2020 at 08:57 | #16

    Just read this I was reading through some of your posts on this site and I think this internet site is rattling informative ! Keep on posting.

  15. September 6th, 2020 at 07:33 | #17

    Major thankies for the blog post. Much obliged.

  16. September 20th, 2020 at 17:27 | #18

    its really really nice piece of writing on building up new webpage.

  17. July 24th, 2021 at 09:23 | #19
  18. November 1st, 2021 at 07:44 | #20
  19. January 7th, 2022 at 03:49 | #21
  20. August 5th, 2022 at 07:01 | #22
  21. August 23rd, 2022 at 17:42 | #23
  22. November 28th, 2022 at 07:45 | #24
  23. December 5th, 2022 at 07:51 | #25
  24. December 25th, 2022 at 17:39 | #26
  25. February 17th, 2023 at 05:32 | #27
  26. February 18th, 2023 at 02:12 | #28
  1. No trackbacks yet.