# Input components through classes

**URL:** <https://forum.kirupa.com/t/input-components-through-classes/219766>\
**Category:** Uncategorized\
**Created:** [March 20, 2007, 12:34am UTC](https://forum.kirupa.com/t/input-components-through-classes/219766 "2007-03-20T00:34:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![puthem1st](https://avatars.discourse-cdn.com/v4/letter/p/ecb155/32.png) [@puthem1st](https://forum.kirupa.com/u/puthem1st)\
**Post date:** [March 20, 2007, 12:34am UTC](https://forum.kirupa.com/t/input-components-through-classes/219766/1 "2007-03-20T00:34:50Z")

</div>

Hi I’m having some difficulity access information from the components through the class file. Its a simple form with 1 text box and 1 button. Upon pressing submit I want to be able to retrieve whatever the users types??  
Here is what I have

```auto

class Product {
 
 var id:Number;
 var prodName:String;
 var description:String;
 
 function Product (id:Number) {
  getID(id);
}
 public function getId () :Number
{                
             var userid = id;
             trace("your input it:"+ id.toString());
                  return id;
         }
}

```

On the button which accesses this file I have.

```auto

on(click){
 var getProducts:Product= Product;
 getProducts.Product();
}

```
