Amrita : how to define the field VALUE of the tag INPUT.

R

Randy

Hello,

I'm using Amrita to build a FORM with some "<INPUT ...>" fields, I
don't know how to define
an identifier for the default value of this input, the field "value".

The following line don't woks :

< INPUT type="text" value= id=my_value />

With my browser, I can obtain in the field :
- an empty field;
- an empty field plus a text field (the value of 'my_value';
- 'id=my_value' ....

Someone can help me ?

Thanks

Have a good day.

Randy
 
P

Paul McMahon

Randy said:
Hello,

I'm using Amrita to build a FORM with some "<INPUT ...>" fields, I
don't know how to define
an identifier for the default value of this input, the field "value".

I'm not quite sure what you are wanting to do as you only gave an html
fragment. However, I am guessing you want to do something like this:

require "amrita/template"
s = "<INPUT type='text' id='my_value' />"
template = Amrita::TemplateText.new(s)
template.expand(STDOUT, { :my_value => Amrita.a:)value => 'a default')})
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,202
Messages
2,571,057
Members
47,666
Latest member
selsetu

Latest Threads

Top