You've tripped over the standard beginner problem when learning DRYML.

The input takes it's value from the "context", AKA "this".  Context is a 
simple concept, but it takes a while to fully grok and to be able to get 
the ability to follow the context as it changes through your DRYML.  The 
DRYML manual page has a good explanation, but experience is the best 
teacher.

I don't have the surrounding DRYML for your input, so I'm not sure what 
your context is.   And you can't just use:

<input with="&1.hour.from_now"/>

because although that will set your default property, it'll lose its name.

The answer might be something like this:

<% this.start ||= &1.hour.from_now %>
<input:start />

or

<% this.start ||= &1.hour.from_now %>
<field-list fields="start">
   <start-view:><input minute-step="&15"/></start-view:>
</field-list>

Hopefully that's enough for you.  If it isn't, post the surrounding DRYML.

Bryan

Mikkel WF wrote:
> I want to apply a :default and a :minute_step attribute to a <input
> for='datetime'>.
> 
> The hobo manual says that other attributes than order are passed
> directly through the datetime_select, but i can't seem to figure out
> exactly what that means.
> 
> I've tried to do the following:
> 
> <input order="day, month, year" default="&1.hour.from_now" minute-
> step="&15"/>
> 
> I initially got some errors with the minute_step, but passing the
> number as a ruby variable solved that problem. But i still can't get
> the default value to show correctly.
> 
> The manual says "The menus default to the current time if the current
> value is nil.", but how can i set that current value?
> 
> // MIkkel WF
> 
> --
> 
> You received this message because you are subscribed to the Google Groups 
> "Hobo Users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/hobousers?hl=en.
> 
> 
> 

--

You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.


Reply via email to