What does it do?
This extension features semi-automatic rendering of frontend user input forms for (custom) Typo3 content types. Thereby it makes heavy use of the meta information already defined in your Typo3 installation. This makes it very easy to create form-based applications in no time. You just have to configure the CWT Frontend Edit Extension with a few lines of code and then it handles everything else. The extension currently features the following:
- Automatic rendering of Input, Textarea, Select, Password, Checkbox and File types.
- Automatic input validation (from TCA) for Input, Textarea, Select, Password and File types.
- Additional customizable input validation possible (email, atLeast, atMost …) for Input, Textarea, Select, Password and File types.
- Customizable form layout via CSS.
Example scenario
You would like to give your registered website users the ability to create and change some kind of profile information (let’s say their address for example). In case of Typo3 your registered users already have a number of database fields by default, including a field for their address (Hint: have a look at the Typo3 database table called “fe_users”). With CWT Feedit the implementation of this simple scenario can be accomplished in three easy steps:
- Create an empty extension that contains a frontend plugin (It will be used to hold the CWT Feedit configuration).
- Create the actual CWT Feedit configuration (only a few lines of code, means less than 10)
- Put the plugin on your website and you’re done.
Let’s say that you would like to enhance your scenario giving users the possibility to change even more database fields. With CWT Feedit this means just have to add two lines (!!!) of code to your previously created CWT Feedit configuration. That’s it!
22 replies on “CWT Feedit”
hallo, in dem video ca @ 1:34 sieht man im menü die option “profil-sichtbarkeit”. ist dieses ein neues feature von cwt? würde das auch gerne verwenden, habe es aber bisher nicht in der cwt_community gesehen.
vielen dank und mfg, jonas
Hallo Jonas,
du hast Recht. Es handelt sich dabei um ein neues Feature der CWT Community, welches ab Version 1.1.0 verfügbar sein wird. Die Version befindet sich derzeit im Review und wird sicher in Kürze (voraussichtlich 1-2 Wochen) veröffentlicht.
Viele Grüße,
Sebastian
Hallo Sebastian,
bin zur Zeit dabei zwei projekte basierend auf der cwt_community umzusetzen. entwickle gerade auch mithilfe der cwt_feedit (nice’s teil) ein gruppenfeature wie bei wkw, könnte man sich ja eventuell absprechen welche neuerungen geplant sind, was ich evtl. schon umgesetzt habe etc.
freue mich auf eine meldung und das update 😉
gruß,
patrik
@Patrik Remmele
Servus Patrik,
ja gerne. Schreib mir doch einfach mal eine Mail.
Viele Grüße,
Sebastian
Hi Sebastian,
I try to bring the cwt extensions in my TypO3 installation. The PHP version is 4.3.10; register_globals=off(I saw that for TypO3 Installation is recommended so). By the FEEDIT extension I get the below error:
Parse error: parse error, unexpected T_CONST, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in ext/cwt_feedit/pi1/class.tx_cwtfeedit_pi1.php on line 63
Could you please give me a tip?
Thanks,
Lily
@Lily
Hey Lily,
this looks like your version of PHP is to old. The CWT Feedit requires PHP 5.x.x.
Regards,
Sebastian
@Sebastian Faulhaber
Hi Sebastian,
thanks. I hoped there was some easy but not straight workaround. I’ll update my php version.
Cheers,
Lily
Once I have created the arrays for configuration, where do I put them? Next where do I find the feedit form? I am using the cwt community extension(0.8.3) & need to add new fields (blogname,tagline,profileinfo,blogimage,hitcounter) to the fe_user profile & then add LL and show the results on the frontend. It doesn’t show up when I try to edit the profile. Do I have to insert php code into the empty plugin ***.p1.php? Kickstarter makes the fields in fe_users just fine, but I don’t see any form to enter the data. Where are the marker arrays & template, do I have to create them?
Thank you.
Hello Christina,
you mentioned that you use CWT Community V0.8.3. Therefore I strongly recommend to update this extension first, before trying to change the CWT Feedit configuration. With Community version 1.1.0 the CWT Feedit configuration has been externalized and may be easily customized. You may find the file here: “cwt_community/pi1/tx_cwtcommunity_pi1_profile_edit.php”.
Regards,
Sebastian
Hi Sebastian!
Well I have updated to CWT 1.1.0 and I still don’t get the new fields to show up in the edit profile form. (the website is in Swedish & many extra functions, so right now all the templates are in a total mess, since the original LL was overwritten & all our custom functions are overwritten…
at any rate I created the variable arrays for the new fields we need in the fe_users table. (blog_name, blog_tagline, hit_counter etc) Do I put this into the dummy frontend plugin or into a separate extension template? Are the new marker arrays and form (text & checkboxes) fields created automatically ? Thanks from a typo3 newbie.
Hello Christina,
you may put the extra fe_user fields in a separate extension or extend the cwt_community_user. However, I’d recommend to create a custom extension, since it will be easier to deal with updates of the Community.
Once you have created the extra database fields, you may want to have a look at the file “pi1/tx_cwtcommunity_pi1_profile_edit.php”. This file contains the FE Edit configuration for the Community profile. Here you will have to add the Feedit configuration for your new database fields, as described in the official manual.
Finally make sure that you add the extension key (of the ext that provides your DB fields) in line 73. E.g. array(“cwt_community_user”, “YOUR EXTENSION KEY GOES HERE”). Then save, clear all caches and it should work.
Regards,
Sebastian
Thank you Sebastian, you are a sweetheart.
The info which is already stored in the fe_users now appears in the edit form. Kudos! (we had feedit working way back) OK. Well the only problem now is that the edited fields apply the changes to the cwtcommunity_user section perfectly, but the new section changes disappear after the preview form is shown (they appear perfectly during the preview). They miss the train, so to speak. Their array drops off after the preview & even though the fields show fine in preview they never land in the fe_users table. The array is missing something (duh!) so how does that get corrected? I have not been able to find another array to correct. Where is it?
Thank you !
Christina
Hi Christina,
I can not find an immediate cause for your problem without more information. So could you please enable debug for the feedit extension. This can be done in the class class.tx_cwtfeedit_pi1.php in line 50 (set debug = true). You should now see the database statement trying to insert/update fe_users table.
The debug output from preview to result page may help to find out whats going wrong here.
Regards,
Sebastian
Hi Sebastian,
Thanks, I already did that and it turned out I had a duplicate field in the query, but mySql did not object so the query was left hanging. (the fault was mine, one too many CTRL C CTRL V…) The confirmation message went through for some reason.
So the problem is resolved.
Best Regards,
Christina
Just wondering…
After I created the dummy plugin (with the new fe_users fields that are needed) with kickstarter, what should be inside the “tx_dummy_pi1.php” file? nothing? the array with the new items? or should those be written in typoscript on the page template? You say to write the configuration (actual CWT Feedit configuration), but you don’t say WHERE to write it. It’s very confusing, What is the correct procedure?
Thank you for your patience,
Christina
Hi Christina,
the “dummy plugin” (new extension) only holds the new database fields but nothing in the extension class so far. This is only to add the new fields to the fe_users table.
As there is no way to extend the items array to edit the profile outside the pi1/tx_cwtcommunity_pi1_profile_edit.php class you have to add your fields there. This is what I meant when writing “configuration”- append your items to the array and adding the extension key. The cwt_feedit needs to know which extension provide the database fields so that it is able to idendify the type of the database field (select, file …).
If you don’t want to change the profile_edit class due to compatibility reasons you can use your new extension, add a dependency to cwt_feedit, write your own extension class and add your own item array there holding all fields from the community and your new fields to have your own “Profile Edit” form. In this case you will not use the one from the community but your own when you create a new page in Typo backend and add your new plugin there.
Best regards,
Sebastian
Hallo Sebastian!
Super Extension. Kann ich damit eigentlich auf ein FE-Edit von tt_news verwirklichen?
Gruß,
Martin
Hallo Martin,
ja, man kann jede Typo3 Tabelle ändern, die eine TCA Konfiguration besitzt. Dazu gehören im allgemeinen alle über den EXT Kickstarter angelegten Tabellen, also auch die von “tt_news”.
Viele Grüße,
Sebastian
Hallo Sebastian,
eine gute Extension, die allerdings an einigen Stellen von mir noch angepaßt wurde, insbesondere bei den Klassen für die verschiedenen Input Felder. Zudem funktioniert sie nicht, wenn register_globals auf off gestellt ist (System TYPO3 4.2.10 / PHP Version 5.2.6-1+lenny3). Wo muß ich denn was umstellen, damit es auch mit einer sicheren Einstellung läuft und ich auf register_globals verzichten kann?
Viele Grüße,
Knud Frank
Hallo Knud,
hierbei handelt es sich derzeit um eine Limitation: die CWT Feedit funktioniert nur mit eingeschaltetem “register_globals”.
Viele Grüße,
Sebastian
Sebastian
PHP Version 5.2.17 / TYPO3 Ver. 4.5.3 macht Probleme mit der Extensions. Das autoloading in TYPO3 lädt die Klasse nicht ( Class ‘tx_cwtfeedit_pi1’ not found in … ).
Abhilfe bietet die Extension ‘extdeveval’ -> Generating ext_autoload.php für cwt_feedit
Grüsse
Daniel
Hi,
Has anyone come across issues when trying to make a file upload field a required field? When I currently try this I submit the form with all correct fields completed and then it gives it back to me (with the file added as a removable link) and I have to submit it again. Is there a way of just submitting the form once?
I also notice that the form validates the file correctly the first time but lets it through the second time, even if it should return an error. For example, in Typo I’ve set the file field to only accept pdf or docs. I try uploading an XML file with the form and it returns and error, but if I click submit again the form goes through and uploads the file which is a big security issue!
Any help or advice on these issues would be much appreciated!
Thanks
Rich