Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-11-10 04:22:58

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Recommendations? Web form creation and processing?

I have been working on a community site and as I get closer to the launch date I am working on how to process applicants. I would really like to have a web form that is xhtml and css valid and preferably free :)

I found response-o-matic and form-assembly and they seem to be alright, but I thought I would throw it out there as something to get some feedback on.

Thanks,

Matthew


Offline

#2 2005-11-10 05:10:12

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: Recommendations? Web form creation and processing?

Have you considered zem_contact?

Offline

#3 2005-11-10 05:16:50

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: Recommendations? Web form creation and processing?

wet,
Thanks, yep, I already use it for my contact page. I am looking for something that I can customize a bit. For instance:

artiswork.org application:

membership interest: |full member| or |critique member| (radio buttons)
(if full member open next radio button possibility.)

>>>

Submit.

I don’t know php (unfortunately :( Maybe if my 13 week old ever learns to sleep, I can start the learning process. If I did, I guess one could customize zem_contact to suit there needs?

So, still looking…


Offline

#4 2005-11-10 14:34:43

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: Recommendations? Web form creation and processing?

Couldn’t you just write each form you want as it’s own plugin that submits the form? That seems like the easiest thing. Check out Dean’s mail to form plugin all it does is define teh form in the php and process it. It would be fairly straight forward to tweak with html knowledge and create just a new plugin for each form you need.

Generic form building tools are (currently building one at work) Even form assembly jumps creates way more convoluted html then I would ever want to deal with.


Shoving is the answer – pusher robot

Offline

#5 2005-11-10 15:52:49

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: Recommendations? Web form creation and processing?

Hakjoon,
I downloaded dean’s mailto.

In the code I see this:
<code>
graf(‘Name’.br.fInput(‘text’,‘sender_name’,$sender_name)),
</code>

I tried to change it to

<code> graf(‘yomomma’.br.fInput(‘text’,‘sender_yomomma’,$sender_yomomma)),
</code>

and I adjusted (copy, paste, edit) the rest of the code in the plugin to try to add an extra field.
Didn’t work. I really feel out of my league here, but this is a good place to start.

I got this error:
<code>
Parse error: parse error, unexpected T_STRING in /home/.emperior/xxxxxx/artiswork.org/textpattern/lib/txplib_misc.php(455) : eval()’d code on line 33
The above errors were caused by the plugin:dca_mailto_form
</code>

So, anychance you could take a look at this, and help me make some progress?

Thanks,

matthew

ps. Where can I find a list of other kinds of input: text, text field, radio buttons, etc?


Offline

#6 2005-11-10 20:04:59

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: Recommendations? Web form creation and processing?

> ma_smith wrote:

ps. Where can I find a list of other kinds of input: text, text field, radio buttons, etc?

All form controls are contained in ../textpattern/lib/txplib_forms.php. It’s rather digestible code…

Last edited by wet (2005-11-10 20:05:29)

Offline

#7 2005-11-10 20:15:12

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: Recommendations? Web form creation and processing?

> ma_smith wrote:

I got this error:
<code>
Parse error: parse error, unexpected T_STRING in /home/.emperior/xxxxxx/artiswork.org/textpattern/lib/txplib_misc.php(455) : eval()’d code on line 33
The above errors were caused by the plugin:dca_mailto_form
</code>

You will have to escape the mid-string single quote (momma*'*s), because it would terminate the preceeding string otherwise which in turn leaves the rest of your string just dangling around and causes PHP to shout at you…

Thus, amend line 34 to read:
$yomomma_err = (!$sender_yomomma) ? graf('Please enter yo momma\'s name.') : '';

Note the backslash in momma\'s. and be happy!

Nevertheless, it makes me wonder why you would try this while dropping zem_contact. zem_contact uses a standard TXP form to build the HTML form and operates at a much higher ease-of-use level than dca_mailto_form.

Last edited by wet (2005-11-10 20:19:54)

Offline

#8 2005-11-10 22:05:35

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: Recommendations? Web form creation and processing?

Also remember that you don’t have to use the the TXP tag building functions. They are nice but I personally find it easier to just do html most of the time. I know html and I don’t completely know Dean’s shortcuts.

You can just do.

<code>
$form =<<<EOF
<h1> bunch of standard html for your form goes here quotes and all</h1>
EOF;
return $form;
</code>

make sure the last EOF is on the very first column of the line. No spaces before it allowed.

Anyway you might not need to learn all this, I haven’t used zem_contact so I can’t vouch for it’s functionality, it just seemed to not be meeting your needs.


Shoving is the answer – pusher robot

Offline

#9 2005-11-10 22:20:49

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: Recommendations? Web form creation and processing?

hakjoon,
Thanks,

I am apt to use that method because I don’t know a lot of php, but where would I put that code and how would I make sure that it gets submitted and emailed (processed) with the rest of the forms?

I am missing just enough from what you’re saying that I’m a bit lost.

If you could give me an example, that would be great.

ALSO: wet, I tried your method, and got no errors, but upon “send” I was redirected to my default page, and I have not yet received any email from the form? Any thoughts?

Thanks,

matthew

Last edited by ma_smith (2005-11-10 22:40:30)


Offline

Board footer

Powered by FluxBB