Actually, it didn't.  I ended up with some unevaluated chunks

[% USE FillInForm %][% FILTER blah blah blah

in my final results.  Sure seemed like it worked for a minute, but then I
lost it and couldn't get it back.  It does seem however, like doing the
following is a much simpler solution

have a file 

conf/path_form.tt
[% js_validation %]
[% USE FillInForm %][% FILTER fillinform fdat => fill %]
<FORM
  NAME      = PATHFORM
  ACTION    = [% env.script_name %]
  METHOD    = post
  STYLE     = 'margin:0'
  ONSUBMIT  = 'return epform_validate_forms_0_()'
>
[% content %]
</FORM>
[% END %]

then just wrap around it

[% WRAPPER 'conf/path_form.tt' %]
blah blah blah
[% END %]

which works like a champ.

Thanks,
Earl

> -----Original Message-----
> From: Cahill, Earl 
> Sent: Wednesday, November 05, 2003 4:49 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [Templates] Embedded tags in declarations
> 
> 
> Looks like that did it.  Thanks a lot.
> 
> Earl
> 
> > -----Original Message-----
> > From: Cahill, Earl 
> > Sent: Wednesday, November 05, 2003 2:54 PM
> > To: [EMAIL PROTECTED]
> > Subject: [Templates] Embedded tags in declarations
> > 
> > 
> > A coworker and I have looked pretty hard to no avail.  I am 
> > having trouble
> > getting tags to parse out in a declaration.
> > 
> > For my PRE_PROCESS I have 'conf/forms', which is as below
> > 
> > [%
> >   path_form = "[% USE FillInForm %][% FILTER fillinform fdat 
> > => fill %]
> >    <FORM
> >       NAME      = PATHFORM
> >       ACTION    = [% env.script_name %]
> >       METHOD    = post
> >       STYLE     = 'margin:0'
> >       ONSUBMIT  =
> > 
> 'if(document.validate_form){if(document.validate_form(this,arguments))
> > return true; else return false;}'
> >     >"
> >   path_form_end = "</FORM>[% END %]"
> > %]
> > 
> > I want to be able to do something like this in any page
> > 
> > [% path_form %]
> > all the form stuff
> > [% path_form_end %]
> > 
> > The big thing is that I need the same onsubmit for each page 
> > to hook my
> > javascript validation.  Adding in the FillInForm seems like a 
> > nice touch.
> > 
> > Anyway, when TT parses conf/forms, I get
> > 
> > file error - parse error - conf/forms line 1-2: unexpected 
> token ("[%)
> >   [% path_form = "[% USE FillInForm %]
> > 
> > It appears that TT doesn't like to evaluate embedded tags in the
> > declaration.  I have tried CONCAT, <<, _ and probably a few 
> > other things
> > with no luck.
> > 
> > Thanks,
> > Earl
> > 
> > _______________________________________________
> > templates mailing list
> > [EMAIL PROTECTED]
> > http://lists.template-toolkit.org/mailman/listinfo/templates
> > 
> 
> _______________________________________________
> templates mailing list
> [EMAIL PROTECTED]
> http://lists.template-toolkit.org/mailman/listinfo/templates
> 

_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to