Form submit not going though act_ include

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Form submit not going though act_ include

Jason Pettis-2
Hi,
I'm working on a page that has a "hand rolled" form - one that's not build with knop_form. The form is for updating a user's profile, and on submit I want to return to the form page. 

When I submit the page I get back to the form, but it doesn't seem to go through the act_ include file.

I'm using the demo files to build out my solution, so I'm working with the _login.inc files. As in the demo, once a person is authenticated they see their profile information on the _login.inc page.

My form element is: <form id="profileUpdateForm" action="[$nav -> url('login')]" method="post">

On submit, I see that cfg_login.inc and lib_login.inc are called, but it doesn't reference act_login.inc 

What, if anything, do I need to do to have the action file called on the form submit?

Thanks!
-Jason Pettis
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Form submit not going though act_ include

stevepiercy
When you do not use knop_form, then a hidden input that contains
the necessary information for the actionpath is not generated
automatically by the Knop framework.

     <input type="hidden" name="-action" value="login">

This can be a little confusing because the input is named
"-action".  I considered refactoring it to name it "-actionpath"
to disambiguate it, but I keep forgetting to ask other Knop
developers their opinion.  Thoughts?

Anyway, just insert that hidden input manually into your form
and you should be good.  But, IMO, you're doing it the hard
way.  You can still use knop_form to configure your form, and
when you want to have explicit control over the layout of your
form, you can either use a template for each form field or do this:

     <somehtml>
     [$f->renderhtml(-field='myfield')]
     </somehtml>

mmm... tasty Knop goodness without the extra calories!

The details of the Knop application flow are documented in the
Knop Manual in two places:
https://github.com/knop-project/knop/blob/master/docs/knop_manual.md#knop-file-structure
https://github.com/knop-project/knop/blob/master/docs/knop_manual.md#knop-application-flow

To see how Knop loads files and when, it is helpful to use ->trace:
https://github.com/knop-project/knop/blob/master/docs/knop_manual.md#debugging

Trace shows the inclusion of files, for example, on login for $nav:

     Debug trace for nav $nav (detailed trace not enabled)
     getlocation: path is login
     Include config: /_config/cfg_login.inc processed in 166 ms
     Include _library/lib__global.inc: /_library/lib__global.inc
processed in 5 ms
     Include content: /_content/cnt_login.inc processed in 58 ms

One thing that has always peeved me about this login system,
however, is that it is quick and dirty.  The security features
that Knop provides are not implemented, and additional basic
security features beyond the scope of Knop are left off.  It's
now a GitHub Issue:
https://github.com/knop-project/knop/issues/44

--steve


On 6/15/12 at 10:47 AM, [hidden email] (Jason Pettis) pronounced:

>Hi,
>I'm working on a page that has a "hand rolled" form - one that's not build
>with knop_form. The form is for updating a user's profile, and on submit I
>want to return to the form page.
>
>When I submit the page I get back to the form, but it doesn't seem to go
>through the act_ include file.
>
>I'm using the demo files to build out my solution, so I'm working with the
>_login.inc files. As in the demo, once a person is authenticated they see
>their profile information on the _login.inc page.
>
>My form element is: <form id="profileUpdateForm" action="[$nav ->
>url('login')]" method="post">
>
>On submit, I see that cfg_login.inc and lib_login.inc are called, but it
>doesn't reference act_login.inc
>
>What, if anything, do I need to do to have the action file called on the
>form submit?
>
>Thanks!
>-Jason Pettis
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Form submit not going though act_ include

Jason Pettis-2
This (and your reply to my other question) are super helpful. Thanks! 

I will look more at using knop_form to build my form and see about placement of elements. The form currently looks like this:  http://www.pettis.org/junk/form_layout.png with each of the three sections in a fieldset tag.

Would I just code in the <form> element myself, and then call each item from the knop_form variable? Is there any other hidden inputs I'd need to include to reference the form var when the action is performed (other than the -action input)?

And, I actually think -actionpath is a little better of a name so as to make it stand out from standard Lasso items.

Finally, I didn't mention it but my backend database is MS-SQL, so some of the knop_database commands don't seem to work (and I am aware that knop isn't set up to work with MS-SQL). However I drive all actions with stored procs so I may be able to get away with the -SQL option. I'll see what I can do.

Thanks again for your help. Knop is really growing on me.
-Jason


On Fri, Jun 15, 2012 at 3:24 PM, Steve Piercy - Web Site Builder <[hidden email]> wrote:
When you do not use knop_form, then a hidden input that contains the necessary information for the actionpath is not generated automatically by the Knop framework.

   <input type="hidden" name="-action" value="login">

This can be a little confusing because the input is named "-action".  I considered refactoring it to name it "-actionpath" to disambiguate it, but I keep forgetting to ask other Knop developers their opinion.  Thoughts?

Anyway, just insert that hidden input manually into your form and you should be good.  But, IMO, you're doing it the hard way.  You can still use knop_form to configure your form, and when you want to have explicit control over the layout of your form, you can either use a template for each form field or do this:

   <somehtml>
   [$f->renderhtml(-field='myfield')]
   </somehtml>

mmm... tasty Knop goodness without the extra calories!

The details of the Knop application flow are documented in the Knop Manual in two places:
https://github.com/knop-project/knop/blob/master/docs/knop_manual.md#knop-file-structure
https://github.com/knop-project/knop/blob/master/docs/knop_manual.md#knop-application-flow

To see how Knop loads files and when, it is helpful to use ->trace:
https://github.com/knop-project/knop/blob/master/docs/knop_manual.md#debugging

Trace shows the inclusion of files, for example, on login for $nav:

   Debug trace for nav $nav (detailed trace not enabled)
   getlocation: path is login
   Include config: /_config/cfg_login.inc processed in 166 ms
   Include _library/lib__global.inc: /_library/lib__global.inc processed in 5 ms
   Include content: /_content/cnt_login.inc processed in 58 ms

One thing that has always peeved me about this login system, however, is that it is quick and dirty.  The security features that Knop provides are not implemented, and additional basic security features beyond the scope of Knop are left off.  It's now a GitHub Issue:
https://github.com/knop-project/knop/issues/44

--steve


On 6/15/12 at 10:47 AM, [hidden email] (Jason Pettis) pronounced:


Hi,
I'm working on a page that has a "hand rolled" form - one that's not build
with knop_form. The form is for updating a user's profile, and on submit I
want to return to the form page.

When I submit the page I get back to the form, but it doesn't seem to go
through the act_ include file.

I'm using the demo files to build out my solution, so I'm working with the
_login.inc files. As in the demo, once a person is authenticated they see
their profile information on the _login.inc page.

My form element is: <form id="profileUpdateForm" action="[$nav ->
url('login')]" method="post">

On submit, I see that cfg_login.inc and lib_login.inc are called, but it
doesn't reference act_login.inc

What, if anything, do I need to do to have the action file called on the
form submit?

Thanks!
-Jason Pettis


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy               Web Site Builder               Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Form submit not going though act_ include

stevepiercy
First, get the help.lasso file installed for Knop 8 or refer to
the online version here:
http://montania.se/projects/knop/help.lasso

When you click on knop_form, you see all the wonderful ways of
rendering the form.

-> renderform
Outputs HTML for the form fields, a specific field, a range of
fields or all fields of a specific type. Also inserts all needed
javascripts into the page. Use form -> setformat first to
specify the html format, otherwise default format #label#
#field##required#<br> is used.

Parameters:
     -name (optional) Render only the specified field
     -from (optional) Render form fields from the specified
number index or field name. Negative number count from the last field.
     -to (optional) Render form fields to the specified number
index or field name. Negative number count from the last field.
     -type (optional) Only render fields of this or these types
(string or array)
     -excludetype (optional) Render fields except of this or
these types (string or array)
     -legend (optional) Groups the rendered fields in a fieldset
and outputs a legend for the fieldset
     -start (optional) Only render the starting <form> tag
     -end (optional) Only render the ending </form> tag
     -xhtml (optional flag) XHTML valid output

Note that this is not correct entirely:

     -start (optional) Only render the starting <form> tag

It actually includes the hidden input for actionpath, a fieldset
and legend, and any other parameters included in the
instantiation of the form.

There are at least two ways to get the form layout you desire
while getting the benefit of using knop_form.

Onesies:
[$form->renderform(-start)]
<your html for layout>
     <div class="single_field">
         [$form->renderform(-name='field1')]
     </div>
     <div class="single_field">
         [$form->renderform(-name='field2')]
     </div>
     ...
</your html for layout>
[$form->renderform(-end)]

Multiplesies:
[$form->renderform(-start)]
<your html for layout>
     [$form->setformat('<div class="single_field">#label# #field##required#</div>')]
     [$form->renderform(-from='field1', -to='fieldN')]
     // to show buttons and custom the button template
     // use $form->setformat(-buttontemplate='<html for button template>')
     [$form->renderform(-type=array('submit', 'reset', 'image'))]
</your html for layout>
[$form->renderform(-end)]

You can even have multiple knop_form instances on a page.  But
that's a discussion for another day....

--steve


On 6/15/12 at 4:32 PM, [hidden email] (Jason Pettis) pronounced:

>This (and your reply to my other question) are super helpful. Thanks!
>
>I will look more at using knop_form to build my form and see about
>placement of elements. The form currently looks like this:
>http://www.pettis.org/junk/form_layout.png with each of the three sections
>in a fieldset tag.
>
>Would I just code in the <form> element myself, and then call each item
>from the knop_form variable? Is there any other hidden inputs I'd need to
>include to reference the form var when the action is performed (other than
>the -action input)?
>
>And, I actually think -actionpath is a little better of a name so as to
>make it stand out from standard Lasso items.
>
>Finally, I didn't mention it but my backend database is MS-SQL, so some of
>the knop_database commands don't seem to work (and I am aware that knop
>isn't set up to work with MS-SQL). However I drive all actions with stored
>procs so I may be able to get away with the -SQL option. I'll see what I
>can do.
>
>Thanks again for your help. Knop is really growing on me.
>-Jason
>
>
>On Fri, Jun 15, 2012 at 3:24 PM, Steve Piercy - Web Site Builder <
>[hidden email]> wrote:
>
>>When you do not use knop_form, then a hidden input that contains the
>>necessary information for the actionpath is not generated automatically by
>>the Knop framework.
>>
>><input type="hidden" name="-action" value="login">
>>
>>This can be a little confusing because the input is named "-action".  I
>>considered refactoring it to name it "-actionpath" to disambiguate it, but
>>I keep forgetting to ask other Knop developers their opinion.  Thoughts?
>>
>>Anyway, just insert that hidden input manually into your form and you
>>should be good.  But, IMO, you're doing it the hard way.  You can still use
>>knop_form to configure your form, and when you want to have explicit
>>control over the layout of your form, you can either use a template for
>>each form field or do this:
>>
>><somehtml>
>>[$f->renderhtml(-field='**myfield')]
>></somehtml>
>>
>>mmm... tasty Knop goodness without the extra calories!
>>
>>The details of the Knop application flow are documented in the Knop Manual
>>in two places:
>>https://github.com/knop-**project/knop/blob/master/docs/**
>>
>knop_manual.md#knop-file-**structure<https://github.com/knop-project/knop/blob/master/
>docs/knop_manual.md#knop-file-structure>
>>https://github.com/knop-**project/knop/blob/master/docs/**
>>
>knop_manual.md#knop-**application-flow<https://github.com/knop-project/knop/blob/master
>/docs/knop_manual.md#knop-application-flow>
>>
>>To see how Knop loads files and when, it is helpful to use ->trace:
>>https://github.com/knop-**project/knop/blob/master/docs/**
>>
>knop_manual.md#debugging<https://github.com/knop-project/knop/blob/master/docs/
>knop_manual.md#debugging>
>>
>>Trace shows the inclusion of files, for example, on login for $nav:
>>
>>Debug trace for nav $nav (detailed trace not enabled)
>>getlocation: path is login
>>Include config: /_config/cfg_login.inc processed in 166 ms
>>Include _library/lib__global.inc: /_library/lib__global.inc processed
>>in 5 ms
>>Include content: /_content/cnt_login.inc processed in 58 ms
>>
>>One thing that has always peeved me about this login system, however, is
>>that it is quick and dirty.  The security features that Knop provides are
>>not implemented, and additional basic security features beyond the scope of
>>Knop are left off.  It's now a GitHub Issue:
>>
>https://github.com/knop-**project/knop/issues/44<https://github.com/knop-project/knop/
>issues/44>
>>
>>--steve
>>
>>
>>On 6/15/12 at 10:47 AM, [hidden email] (Jason Pettis) pronounced:
>>
>>
>>Hi,
>>> I'm working on a page that has a "hand rolled" form - one that's not build
>>> with knop_form. The form is for updating a user's profile, and on submit I
>>> want to return to the form page.
>>>
>>> When I submit the page I get back to the form, but it doesn't seem to go
>>> through the act_ include file.
>>>
>>> I'm using the demo files to build out my solution, so I'm working with the
>>> _login.inc files. As in the demo, once a person is authenticated they see
>>> their profile information on the _login.inc page.
>>>
>>> My form element is: <form id="profileUpdateForm" action="[$nav ->
>>> url('login')]" method="post">
>>>
>>> On submit, I see that cfg_login.inc and lib_login.inc are called, but it
>>> doesn't reference act_login.inc
>>>
>>> What, if anything, do I need to do to have the action file called on the
>>> form submit?
>>>
>>> Thanks!
>>> -Jason Pettis
>>>
>>>
>>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>Steve Piercy               Web Site Builder               Soquel, CA
>><[hidden email]>                  <http://www.StevePiercy.com/>
>>
>>
>>--
>>##############################**##############################**#
>>This message is sent to you because you are subscribed to
>>the mailing list <[hidden email]>.
>>To unsubscribe, E-mail to: <[hidden email]>
>>Send administrative queries to
><[hidden email].**se<[hidden email]>
>>>
>>List archive http://lasso.2283332.n4.**nabble.com/Knop-Framework-**
>>
>Discussion-f3157831.html<http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-
>f3157831.html>
>>Project homepage
>http://montania.se/projects/**knop/<http://montania.se/projects/knop/>
>>Google Code has the latest downloads at http://code.google.com/p/knop/
>>
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Form submit not going though act_ include

Johan Solve-2
There's also http://knop.nu


At 16.44 -0700 2012-06-15, Steve Piercy - Web Site Builder wrote:

>First, get the help.lasso file installed for Knop 8 or refer to the online version here:
>http://montania.se/projects/knop/help.lasso
>
>When you click on knop_form, you see all the wonderful ways of rendering the form.
>
>-> renderform
>Outputs HTML for the form fields, a specific field, a range of fields or all fields of a specific type. Also inserts all needed javascripts into the page. Use form -> setformat first to specify the html format, otherwise default format #label# #field##required#<br> is used.
>
>Parameters:
>    -name (optional) Render only the specified field
>    -from (optional) Render form fields from the specified number index or field name. Negative number count from the last field.
>    -to (optional) Render form fields to the specified number index or field name. Negative number count from the last field.
>    -type (optional) Only render fields of this or these types (string or array)
>    -excludetype (optional) Render fields except of this or these types (string or array)
>    -legend (optional) Groups the rendered fields in a fieldset and outputs a legend for the fieldset
>    -start (optional) Only render the starting <form> tag
>    -end (optional) Only render the ending </form> tag
>    -xhtml (optional flag) XHTML valid output
>
>Note that this is not correct entirely:
>
>    -start (optional) Only render the starting <form> tag
>
>It actually includes the hidden input for actionpath, a fieldset and legend, and any other parameters included in the instantiation of the form.
>
>There are at least two ways to get the form layout you desire while getting the benefit of using knop_form.
>
>Onesies:
>[$form->renderform(-start)]
><your html for layout>
>    <div class="single_field">
>        [$form->renderform(-name='field1')]
>    </div>
>    <div class="single_field">
>        [$form->renderform(-name='field2')]
>    </div>
>    ...
></your html for layout>
>[$form->renderform(-end)]
>
>Multiplesies:
>[$form->renderform(-start)]
><your html for layout>
>    [$form->setformat('<div class="single_field">#label# #field##required#</div>')]
>    [$form->renderform(-from='field1', -to='fieldN')]
>    // to show buttons and custom the button template
>    // use $form->setformat(-buttontemplate='<html for button template>')
>    [$form->renderform(-type=array('submit', 'reset', 'image'))]
></your html for layout>
>[$form->renderform(-end)]
>
>You can even have multiple knop_form instances on a page.  But that's a discussion for another day....
>
>--steve
>
>
>On 6/15/12 at 4:32 PM, [hidden email] (Jason Pettis) pronounced:
>
>>This (and your reply to my other question) are super helpful. Thanks!
>>
>>I will look more at using knop_form to build my form and see about
>>placement of elements. The form currently looks like this:
>>http://www.pettis.org/junk/form_layout.png with each of the three sections
>>in a fieldset tag.
>>
>>Would I just code in the <form> element myself, and then call each item
>>from the knop_form variable? Is there any other hidden inputs I'd need to
>>include to reference the form var when the action is performed (other than
>>the -action input)?
>>
>>And, I actually think -actionpath is a little better of a name so as to
>>make it stand out from standard Lasso items.
>>
>>Finally, I didn't mention it but my backend database is MS-SQL, so some of
>>the knop_database commands don't seem to work (and I am aware that knop
>>isn't set up to work with MS-SQL). However I drive all actions with stored
>>procs so I may be able to get away with the -SQL option. I'll see what I
>>can do.
>>
>>Thanks again for your help. Knop is really growing on me.
>>-Jason
>>
>>
>>On Fri, Jun 15, 2012 at 3:24 PM, Steve Piercy - Web Site Builder <
>>[hidden email]> wrote:
>>
>>>When you do not use knop_form, then a hidden input that contains the
>>>necessary information for the actionpath is not generated automatically by
>>>the Knop framework.
>>>
>>><input type="hidden" name="-action" value="login">
>>>
>>>This can be a little confusing because the input is named "-action".  I
>>>considered refactoring it to name it "-actionpath" to disambiguate it, but
>>>I keep forgetting to ask other Knop developers their opinion.  Thoughts?
>>>
>>>Anyway, just insert that hidden input manually into your form and you
>>>should be good.  But, IMO, you're doing it the hard way.  You can still use
>>>knop_form to configure your form, and when you want to have explicit
>>>control over the layout of your form, you can either use a template for
>>>each form field or do this:
>>>
>>><somehtml>
>>>[$f->renderhtml(-field='**myfield')]
>>></somehtml>
>>>
>>>mmm... tasty Knop goodness without the extra calories!
>>>
>>>The details of the Knop application flow are documented in the Knop Manual
>>>in two places:
>>>https://github.com/knop-**project/knop/blob/master/docs/**
>>>
>>knop_manual.md#knop-file-**structure<https://github.com/knop-project/knop/blob/master/
>>docs/knop_manual.md#knop-file-structure>
>>>https://github.com/knop-**project/knop/blob/master/docs/**
>>>
>>knop_manual.md#knop-**application-flow<https://github.com/knop-project/knop/blob/master
>>/docs/knop_manual.md#knop-application-flow>
>>>
>>>To see how Knop loads files and when, it is helpful to use ->trace:
>>>https://github.com/knop-**project/knop/blob/master/docs/**
>>>
>>knop_manual.md#debugging<https://github.com/knop-project/knop/blob/master/docs/
>>knop_manual.md#debugging>
>>>
>>>Trace shows the inclusion of files, for example, on login for $nav:
>>>
>>>Debug trace for nav $nav (detailed trace not enabled)
>>>getlocation: path is login
>>>Include config: /_config/cfg_login.inc processed in 166 ms
>>>Include _library/lib__global.inc: /_library/lib__global.inc processed
>>>in 5 ms
>>>Include content: /_content/cnt_login.inc processed in 58 ms
>>>
>>>One thing that has always peeved me about this login system, however, is
>>>that it is quick and dirty.  The security features that Knop provides are
>>>not implemented, and additional basic security features beyond the scope of
>>>Knop are left off.  It's now a GitHub Issue:
>>>
>>https://github.com/knop-**project/knop/issues/44<https://github.com/knop-project/knop/
>>issues/44>
>>>
>>>--steve
>>>
>>>
>>>On 6/15/12 at 10:47 AM, [hidden email] (Jason Pettis) pronounced:
>>>
>>>
>>>Hi,
>>>>I'm working on a page that has a "hand rolled" form - one that's not build
>>>>with knop_form. The form is for updating a user's profile, and on submit I
>>>>want to return to the form page.
>>>>
>>>>When I submit the page I get back to the form, but it doesn't seem to go
>>>>through the act_ include file.
>>>>
>>>>I'm using the demo files to build out my solution, so I'm working with the
>>>>_login.inc files. As in the demo, once a person is authenticated they see
>>>>their profile information on the _login.inc page.
>>>>
>>>>My form element is: <form id="profileUpdateForm" action="[$nav ->
>>>>url('login')]" method="post">
>>>>
>>>>On submit, I see that cfg_login.inc and lib_login.inc are called, but it
>>>>doesn't reference act_login.inc
>>>>
>>>>What, if anything, do I need to do to have the action file called on the
>>>>form submit?
>>>>
>>>>Thanks!
>>>>-Jason Pettis
>>>>
>>>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>>Steve Piercy               Web Site Builder               Soquel, CA
>>><[hidden email]>                  <http://www.StevePiercy.com/>
>>>
>>>
>>>--
>>>##############################**##############################**#
>>>This message is sent to you because you are subscribed to
>>>the mailing list <[hidden email]>.
>>>To unsubscribe, E-mail to: <[hidden email]>
>>>Send administrative queries to
>><[hidden email].**se<[hidden email]>
>>>>
>>>List archive http://lasso.2283332.n4.**nabble.com/Knop-Framework-**
>>>
>>Discussion-f3157831.html<http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-
>>f3157831.html>
>>>Project homepage
>>http://montania.se/projects/**knop/<http://montania.se/projects/knop/>
>>>Google Code has the latest downloads at http://code.google.com/p/knop/
>>>
>>
>
>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>Steve Piercy               Web Site Builder
>Soquel, CA
><[hidden email]>                  <http://www.StevePiercy.com/>
>
>
>--
>#############################################################
>This message is sent to you because you are subscribed to
>the mailing list <[hidden email]>.
>To unsubscribe, E-mail to: <[hidden email]>
>Send administrative queries to  <[hidden email]>
>List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
>Project homepage http://montania.se/projects/knop/
>Google Code has the latest downloads at http://code.google.com/p/knop/


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

--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Form submit not going though act_ include

stevepiercy
There's also an upcoming component to the Evil Plan™.  It's a
secret, unless you read the bug tracker on GitHub.

--steve


On 6/16/12 at 11:09 PM, [hidden email] (Johan Solve) pronounced:

>There's also http://knop.nu
>
>
>At 16.44 -0700 2012-06-15, Steve Piercy - Web Site Builder wrote:
>>First, get the help.lasso file installed for Knop 8 or refer to the online version
>here:
>>http://montania.se/projects/knop/help.lasso
>>
>>When you click on knop_form, you see all the wonderful ways of rendering the form.
>>
>>-> renderform
>>Outputs HTML for the form fields, a specific field, a range of fields or all fields of
>a specific type. Also inserts all needed javascripts into the
>page. Use form -> setformat first to specify the html format,
>otherwise default format #label# #field##required#<br> is used.
>>
>>Parameters:
>>-name (optional) Render only the specified field
>>-from (optional) Render form fields from the specified number index or field name.
>Negative number count from the last field.
>>-to (optional) Render form fields to the specified number index or field name.
>Negative number count from the last field.
>>-type (optional) Only render fields of this or these types (string or array)
>>-excludetype (optional) Render fields except of this or these types (string or
>array)
>>-legend (optional) Groups the rendered fields in a fieldset and outputs a legend
>for the fieldset
>>-start (optional) Only render the starting <form> tag
>>-end (optional) Only render the ending </form> tag
>>-xhtml (optional flag) XHTML valid output
>>
>>Note that this is not correct entirely:
>>
>>-start (optional) Only render the starting <form> tag
>>
>>It actually includes the hidden input for actionpath, a fieldset and legend, and any
>other parameters included in the instantiation of the form.
>>
>>There are at least two ways to get the form layout you desire while getting the
>benefit of using knop_form.
>>
>>Onesies:
>>[$form->renderform(-start)]
>><your html for layout>
>><div class="single_field">
>>[$form->renderform(-name='field1')]
>></div>
>><div class="single_field">
>>[$form->renderform(-name='field2')]
>></div>
>>...
>></your html for layout>
>>[$form->renderform(-end)]
>>
>>Multiplesies:
>>[$form->renderform(-start)]
>><your html for layout>
>>[$form->setformat('<div class="single_field">#label# #field##required#</div>')]
>>[$form->renderform(-from='field1', -to='fieldN')]
>>// to show buttons and custom the button template
>>// use $form->setformat(-buttontemplate='<html for button template>')
>>[$form->renderform(-type=array('submit', 'reset', 'image'))]
>></your html for layout>
>>[$form->renderform(-end)]
>>
>>You can even have multiple knop_form instances on a page.  But that's a discussion for
>another day....
>>
>>--steve
>>
>>
>>On 6/15/12 at 4:32 PM, [hidden email] (Jason Pettis) pronounced:
>>
>>>This (and your reply to my other question) are super helpful. Thanks!
>>>
>>>I will look more at using knop_form to build my form and see about
>>>placement of elements. The form currently looks like this:
>>>http://www.pettis.org/junk/form_layout.png with each of the three sections
>>>in a fieldset tag.
>>>
>>>Would I just code in the <form> element myself, and then call each item
>>>from the knop_form variable? Is there any other hidden inputs I'd need to
>>>include to reference the form var when the action is performed (other than
>>>the -action input)?
>>>
>>>And, I actually think -actionpath is a little better of a name so as to
>>>make it stand out from standard Lasso items.
>>>
>>>Finally, I didn't mention it but my backend database is MS-SQL, so some of
>>>the knop_database commands don't seem to work (and I am aware that knop
>>>isn't set up to work with MS-SQL). However I drive all actions with stored
>>>procs so I may be able to get away with the -SQL option. I'll see what I
>>>can do.
>>>
>>>Thanks again for your help. Knop is really growing on me.
>>>-Jason
>>>
>>>
>>>On Fri, Jun 15, 2012 at 3:24 PM, Steve Piercy - Web Site Builder <
>>>[hidden email]> wrote:
>>>
>>>>When you do not use knop_form, then a hidden input that contains the
>>>>necessary information for the actionpath is not generated automatically by
>>>>the Knop framework.
>>>>
>>>><input type="hidden" name="-action" value="login">
>>>>
>>>>This can be a little confusing because the input is named "-action".  I
>>>>considered refactoring it to name it "-actionpath" to disambiguate it, but
>>>>I keep forgetting to ask other Knop developers their opinion.  Thoughts?
>>>>
>>>>Anyway, just insert that hidden input manually into your form and you
>>>>should be good.  But, IMO, you're doing it the hard way.  You can still use
>>>>knop_form to configure your form, and when you want to have explicit
>>>>control over the layout of your form, you can either use a template for
>>>>each form field or do this:
>>>>
>>>><somehtml>
>>>>[$f->renderhtml(-field='**myfield')]
>>>></somehtml>
>>>>
>>>>mmm... tasty Knop goodness without the extra calories!
>>>>
>>>>The details of the Knop application flow are documented in the Knop Manual
>>>>in two places:
>>>>https://github.com/knop-**project/knop/blob/master/docs/**
>>>>
>>>knop_manual.md#knop-file-**structure<https://github.com/knop-project/knop/blob/master
>/
>>>docs/knop_manual.md#knop-file-structure>
>>>>https://github.com/knop-**project/knop/blob/master/docs/**
>>>>
>>>knop_manual.md#knop-**application-flow<https://github.com/knop-project/knop/blob/
>master
>>>/docs/knop_manual.md#knop-application-flow>
>>>>
>>>>To see how Knop loads files and when, it is helpful to use ->trace:
>>>>https://github.com/knop-**project/knop/blob/master/docs/**
>>>>
>>>knop_manual.md#debugging<https://github.com/knop-project/knop/blob/master/docs/
>>>knop_manual.md#debugging>
>>>>
>>>>Trace shows the inclusion of files, for example, on login for $nav:
>>>>
>>>>Debug trace for nav $nav (detailed trace not enabled)
>>>>getlocation: path is login
>>>>Include config: /_config/cfg_login.inc processed in 166 ms
>>>>Include _library/lib__global.inc: /_library/lib__global.inc processed
>>>>in 5 ms
>>>>Include content: /_content/cnt_login.inc processed in 58 ms
>>>>
>>>>One thing that has always peeved me about this login system, however, is
>>>>that it is quick and dirty.  The security features that Knop provides are
>>>>not implemented, and additional basic security features beyond the scope of
>>>>Knop are left off.  It's now a GitHub Issue:
>>>>
>>>https://github.com/knop-**project/knop/issues/44<https://github.com/knop-project/knop
>/
>>>issues/44>
>>>>
>>>>--steve
>>>>
>>>>
>>>>On 6/15/12 at 10:47 AM, [hidden email] (Jason Pettis) pronounced:
>>>>
>>>>
>>>>Hi,
>>>>>I'm working on a page that has a "hand rolled" form - one that's not build
>>>>>with knop_form. The form is for updating a user's profile, and on submit I
>>>>>want to return to the form page.
>>>>>
>>>>>When I submit the page I get back to the form, but it doesn't seem to go
>>>>>through the act_ include file.
>>>>>
>>>>>I'm using the demo files to build out my solution, so I'm working with the
>>>>>_login.inc files. As in the demo, once a person is authenticated they see
>>>>>their profile information on the _login.inc page.
>>>>>
>>>>>My form element is: <form id="profileUpdateForm" action="[$nav ->
>>>>>url('login')]" method="post">
>>>>>
>>>>>On submit, I see that cfg_login.inc and lib_login.inc are called, but it
>>>>>doesn't reference act_login.inc
>>>>>
>>>>>What, if anything, do I need to do to have the action file called on the
>>>>>form submit?
>>>>>
>>>>>Thanks!
>>>>>-Jason Pettis
>>>>>
>>>>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>>>Steve Piercy               Web Site Builder               Soquel, CA
>>>><[hidden email]>                  <http://www.StevePiercy.com/>
>>>>
>>>>
>>>>--
>>>>##############################**##############################**#
>>>>This message is sent to you because you are subscribed to
>>>>the mailing list <[hidden email]>.
>>>>To unsubscribe, E-mail to: <[hidden email]>
>>>>Send administrative queries to
>>><[hidden email].**se<[hidden email]>
>>>>>
>>>>List archive http://lasso.2283332.n4.**nabble.com/Knop-Framework-**
>>>>
>>>Discussion-f3157831.html<http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion
>-
>>>f3157831.html>
>>>>Project homepage
>>>http://montania.se/projects/**knop/<http://montania.se/projects/knop/>
>>>>Google Code has the latest downloads at http://code.google.com/p/knop/
>>>>
>>>
>>
>>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>Steve Piercy               Web Site Builder
>>Soquel, CA
>><[hidden email]>                  <http://www.StevePiercy.com/>
>>
>>
>>--
>>#############################################################
>>This message is sent to you because you are subscribed to
>>the mailing list <[hidden email]>.
>>To unsubscribe, E-mail to: <[hidden email]>
>>Send administrative queries to  <[hidden email]>
>>List archive
>http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
>>Project homepage http://montania.se/projects/knop/
>>Google Code has the latest downloads at http://code.google.com/p/knop/
>
>
>--
>Johan Sölve    [FSA Member, Lasso Partner]
>Web Application/Lasso/FileMaker Developer
>MONTANIA SOFTWARE & SOLUTIONS
>http://www.montania.se   mailto:[hidden email]
>(spam-safe email address, replace '-' with 'a')
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Loading...