OK That is definitely helpful for the syntax, thanks.

Is there any way to dynamic javascript on the page to update the data
in the submit?  Looks like you are updating when the page is rendered
only?

I think I need hidden fields and update them via javascript and then
submit that via a button.

But now I can't figure out how to get hidden fields into <forms>  I
use <form> without the : to avoid using as a parameter, but I still
can't put any regular HTML fields into the form. They just disappear
when the page is rendered.  I need some hidden fields and send that to
an update on the parent of the instance object.

So I will look in the docs or examples for this, the default pages
seem to complicated because they don't update parents directly.  This
doesn't quite work:

<form: for="&this.project" update="start_position_seconds">

i don't get the form context to switch, it still remains at the
child.  project is the parent name which is accessible from the child.

Ankur

On Feb 4, 9:57 pm, "[email protected]" <[email protected]>
wrote:
> Check out this card I made for my milestones:
>
> <def tag="card" for="Milestone">
>  <card class="milestone" param="default" merge>
>     <header:>
>       <h4 param="heading"><a><name/></a></h4>
>     </header:>
>     <body:>
>         <div part="milestone-data"  id="milestone-data-#{typed_id}">
>             <div class="#{this.status_color}">
>                 Due: <this.target-date/><br/>
>                   <if test="&this.completion_date">
>                       Completed by <name with="&this.completer"/> on
> <this.completion-date/><br/>
>                   </if>
>                 <a if="&this.assigned_user"
> with="&this.assigned_user">Belongs to: <name /></a><br/>
>                 Group: <a if="&this.assigned_group"
> with="&this.assigned_group"><name/></a>
>                 <if test="&this.assigned_group">
>                     <if test="&this.completion_date == nil &&
> (current_user.groups.find_by_name(this.assigned_group.name) ||
> this.assigned_user == current_user)">
>                         <update-button fields="&{:completion_date =>
> Date.today(), :completer_id => current_user.id}"
> update="milestone-data-#{typed_id}" label="mark done" confirm="are you
> sure?"/>
>                     </if>
>                 </if>
>                 <else>
>                     <if test="&this.completion_date == nil &&
> (this.assigned_user == current_user)">
>                         <update-button fields="&{:completion_date =>
> Date.today(), :completer_id => current_user.id}"
> update="milestone-data-#{typed_id}" label="mark done" confirm="are you
> sure?"/>
>                     </if>
>                 </else>
>             </div>
>         </div>
>     </body>
>   </card>
> </def>
>
> sorry about the nested ifs, it was necessary I swear! but that should
> elucidate things a bit for ya :D

-- 
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