Here is the extended form tag

<extend tag="form" for="CalendarEntry">
  <old-form merge>
  <field-list: replace>
    <if test="&this.event_tz.nil?">
      <field-list restore/>
    </if>
    <else>
      <field-list fields="name, scheduled_time_event, event"/>
    </else>
  </field-list:>
  </old-form>
</extend>

And here is how I want to use it in a page (well, it's actually in a
partial, but I forgot the reasons why I put it in a partial).

<form id="calendar-entry-form" >
  <field-list: skip="event"/>
  <submit: id="submit-button" />
  <cancel: id="cancel-button" href="#" />
</form>

scheduled_time_event is the virtual attribute in this case, and it's
only being displayed if the parent event has the time zone being set,
otherwise it should display the normal attribute instead of the
virtual one.

Thanks in advance for helping.


Best regards,
Sirajuddin Maizir


On Jul 25, 11:56 pm, Bryan Larsen <[email protected]> wrote:
> It sounds like you're missing some merge statements.   Post your
> definition and we'll see if we can help.
>
> Bryan
>
>
>
>
>
>
>
> On Mon, Jul 25, 2011 at 5:44 AM, Sirajuddin Maizir <[email protected]> wrote:
> > Hi,
>
> > I'm customizing field-list of a form to include some virtual
> > attributes by extending the form tag for the model. The problem is,
> > now I can't customize the field-list for that form in a page anymore.
> > Even the auto generated form in the new-for- page (the model has a
> > parent) can't hide the attribute that refer to the parent anymore,
> > since I include it in my extended form tag.
>
> > Any thoughts?
>
> > Best regards,
>
> > Sirajuddin Maizir
>
> > --
> > 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 
> > athttp://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