Help, directory

I am try to allow the user to type in the destination he wanan go, e.g. /home/eflt001/XXXXX, I have already done the Form.input part.....I wanna use Text objects as the next object ........i.e. after he has entered the path, hitting F3 key, the text object will list the files of the directory he specified.....how to do so?

isn't it as simple as

`cd $name`
text=`ls` ??

$name is the variable that holds the input from the user.

But it didn't work .....it lists the files but never go to the directory which the user specifies.

It doesn't make sense to have a cd command in backquotes. Just use:
cd $name