rejetto forum
Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: xmodpt on March 21, 2012, 05:42:03 PM
-
Hello all
i think HFS is one hell of a tool and so i am trying to explore new ways to put it to good use.
I have a need.
Create a form so a user can type some text and save it in the server it self.
In other words, lets say.. a comments form... a user puts a coment on a text box and when it presses submit.... the form will save all data in to a text file in a specific folder within the server (HFS).
Since HFS does not support PHP :-[ ... it there any way i can acomplish this ???
Thank you in advanced.
Regards 2 u all
-
sorry for the late reply.
yes, you can do it and you can find even some simple chat made with hfs scripting on the forum.
you will need version 2.3 anyway.
you can have
<form method='post' action="~process-form">
<textarea name='comment'>
and then in the template you create a new section
[process-form]
{.save|myfile|{.postvar|comment.}.}
my example is very bare, but it's a good start.
search the forum for examples.
here (http://www.rejetto.com/wiki/index.php?title=HFS:_scripting_commands#Data_getting) you can find a list of all available commands