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

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

Randy wrote:

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 = “”
template = Amrita::TemplateText.new(s)
template.expand(STDOUT, { :my_value => Amrita.a(:value => ‘a default’)})

Hi Paul,

On 18 juin, 10:02, Paul McMahon [email protected] wrote:

However, I am guessing you want to do something like this:

You 're right !

Thanks for your reply, I can continue my work :slight_smile:

Have a good day.

Randy