Custom form block

Permalink
Hi all, what should I do for creating a custom form block?
I copied view.php under concrete/blocks/form to blocks/form/templates/ and renamed it.
Offcourse changed the theme of the block on the page.

Cause in view.php there isn't much to change, I also copied the controller.php.
Should I combine these files? What do I do?
Thanks

Dutchwave
 
Tony replied on at Permalink Reply
Tony
not sure exactly what you're trying to customize, but that form block's a bit tricky to extend. you might be better off just totally bypassing the form block, and just making a single page to hold a new html form, then putting the logic in that single page controller.
Dutchwave replied on at Permalink Reply
Dutchwave
For example what I would like, is to put a value in to a textfield(type your name here..). Having two fields next to each other, which is not possible with the current table around it.
kirkroberts replied on at Permalink Reply
kirkroberts
I know there is a thread in the forums with attachments that have a table-less layout for the form block. Try searching for it.

For your second item, check out Remo's tutorial on customizing the form block view:
http://www.codeblog.ch/2009/07/concrete5-form-layout/...
matogertel replied on at Permalink Reply
matogertel
Dutchwave replied on at Permalink Reply
Dutchwave
Looked at the options. Only want one form to be different then the others. So most options don't apply, still would need a template.
Matogertels option could work then, but gives my controller errors etc...
So I'll just work with what the current block has to offer.
Cheers guys.
matogertel replied on at Permalink Reply
matogertel
I'm interested to know what kind of errors you were getting so we can fix them
Dutchwave replied on at Permalink Reply
Dutchwave
Just to have to show the error here I added it one more time. When adding it:

Fatal error: Cannot redeclare class FormBlockStatistics in /srv/equipe/www/www.equipe-trading.nl/packages/community_form/blocks/community_form/controller.php on line 431

The worst part that this time when logged in I can't manage to go back anymore towards the page. Can't even delete it anymore...