Knop form questions

View: New views
6 Messages — Rating Filter:   Alert me  

Knop form questions

by Brian Loomis-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm messing around with knop form this morning and have some questions.

1) Is is possible using this: [$form -> renderform( -xhtml=true)]  to  
get the form pieces to follow any other format than the <br />  
delimited format? For example, I'd like to continue to use forms  
inside of 960 grids so I have control over the spacing precisely.

2) It looks like there may be several points where the output could be  
adjusted to wrap the forms pieces in <li></li> instead of the <br />.  
Is anyone doing this yet?

Brian Loomis

--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <knop@...>.
To unsubscribe, E-mail to: <knop-off@...>
Send administrative queries to  <knop-request@...>
List archive http://www.nabble.com/Knop-Framework-Discussion-f29076.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/

Re: Knop form questions

by Brian Loomis-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I guess to be more clear, can you use an HTML template and render each  
component separately inside of unque areas?  Spans or divs' for example?

On Nov 3, 2009, at 1:01 PM, Brian Loomis wrote:

> 1) Is is possible using this: [$form -> renderform( -xhtml=true)]  
> to get the form pieces to follow any other format than the <br />  
> delimited format? For example, I'd like to continue to use forms  
> inside of 960 grids so I have control over the spacing precisely.


--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <knop@...>.
To unsubscribe, E-mail to: <knop-off@...>
Send administrative queries to  <knop-request@...>
List archive http://www.nabble.com/Knop-Framework-Discussion-f29076.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/

Re: Knop form questions

by Steve Piercy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 11/3/09 at 1:01 PM, brianloomis1@... (Brian Loomis) pronounced:

>I'm messing around with knop form this morning and have some questions.
>
>1) Is is possible using this: [$form -> renderform(
>-xhtml=true)]  to get the form pieces to follow any other
>format than the <br /> delimited format? For example, I'd like
>to continue to use forms inside of 960 grids so I have control
>over the spacing precisely.

Yup.

$f->renderform(-from=x,-to=y); // where x and y are the starting
and ending index values of form objects in the config file.

or

$f->renderform(-name='name');

>2) It looks like there may be several points where the output
>could be adjusted to wrap the forms pieces in <li></li> instead
>of the <br />.  Is anyone doing this yet?

Yup.  Using an iterate for example:

<ul>
[
     iterate(array('field1','field2',...,'fieldN'), local('i'));
         '<li>' + $f->renderform(-name='name') + '</li>';
     iterate;
]
</ul>

You can also use string string_replace on
$f->renderform(-name='name') to modify the output.

--steve

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<web@...>                  <http://www.StevePiercy.com/>


--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <knop@...>.
To unsubscribe, E-mail to: <knop-off@...>
Send administrative queries to  <knop-request@...>
List archive http://www.nabble.com/Knop-Framework-Discussion-f29076.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/

Re: Knop form questions

by Johan Solve-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

At 12.58 -0800 2009-11-03, Steve Piercy - Web Site Builder wrote:
>On 11/3/09 at 1:01 PM, brianloomis1@... (Brian Loomis) pronounced:
>
>>I'm messing around with knop form this morning and have some questions.
>>
>>1) Is is possible using this: [$form -> renderform( -xhtml=true)]  to get the form pieces to follow any other format than the <br /> delimited format? For example, I'd like to continue to use forms inside of 960 grids so I have control over the spacing precisely.
>
>Yup.
>
>$f->renderform(-from=x,-to=y); // where x and y are the starting and ending index values of form objects in the config file.

-from and -to can also take names.


--
     Johan Sölve    [FSA Member, Lasso Partner]
     Web Application/Lasso/FileMaker Developer
     MONTANIA SOFTWARE & SOLUTIONS
http://www.montania.se   mailto:joh-n@...
 (spam-safe email address, replace '-' with 'a')

--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <knop@...>.
To unsubscribe, E-mail to: <knop-off@...>
Send administrative queries to  <knop-request@...>
List archive http://www.nabble.com/Knop-Framework-Discussion-f29076.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/

Re: Knop form questions

by Johan Solve-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

At 13.01 -0700 2009-11-03, Brian Loomis wrote:
>2) It looks like there may be several points where the output could be adjusted to wrap the forms pieces in <li></li> instead of the <br />.
>Is anyone doing this yet?

As you probably already know you can specify a template for the form with the -template parameter, either when creating the form object or using the ->setformat tag afterwards.

The default template looks like this
#label# #field##required#<br>

So I guess you would use a template string like this
<li>#label# #field##required#</li>

--
     Johan Sölve    [FSA Member, Lasso Partner]
     Web Application/Lasso/FileMaker Developer
     MONTANIA SOFTWARE & SOLUTIONS
http://www.montania.se   mailto:joh-n@...
 (spam-safe email address, replace '-' with 'a')

--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <knop@...>.
To unsubscribe, E-mail to: <knop-off@...>
Send administrative queries to  <knop-request@...>
List archive http://www.nabble.com/Knop-Framework-Discussion-f29076.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/

Re: Knop form questions

by Brian Loomis-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

beautiful stuff.

On Nov 3, 2009, at 4:51 PM, Johan Solve wrote:

> At 13.01 -0700 2009-11-03, Brian Loomis wrote:
>> 2) It looks like there may be several points where the output could  
>> be adjusted to wrap the forms pieces in <li></li> instead of the  
>> <br />.
>> Is anyone doing this yet?
>
> As you probably already know you can specify a template for the form  
> with the -template parameter, either when creating the form object  
> or using the ->setformat tag afterwards.
>
> The default template looks like this
> #label# #field##required#<br>
>
> So I guess you would use a template string like this
> <li>#label# #field##required#</li>
>
> --
>     Johan Sölve    [FSA Member, Lasso Partner]
>     Web Application/Lasso/FileMaker Developer
>     MONTANIA SOFTWARE & SOLUTIONS
> http://www.montania.se   mailto:joh-n@...
> (spam-safe email address, replace '-' with 'a')
>
> --
> #############################################################
> This message is sent to you because you are subscribed to
> the mailing list <knop@...>.
> To unsubscribe, E-mail to: <knop-off@...>
> Send administrative queries to  <knop-request@...>
> List archive http://www.nabble.com/Knop-Framework-Discussion-f29076.html
> Project homepage http://montania.se/projects/knop/
> Google Code has the latest downloads at http://code.google.com/p/knop/


--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <knop@...>.
To unsubscribe, E-mail to: <knop-off@...>
Send administrative queries to  <knop-request@...>
List archive http://www.nabble.com/Knop-Framework-Discussion-f29076.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/