Topic RSS
7:12 am
March 6, 2005
OfflineWith v10.3 the support for extra comment fields (in addition to author, url, email & comment) has been much improved.
Adding two extra fields (e.g. another text input field + a check box) only takes a few steps now, here is how it's done:
[#1] Form Configuration:
Extend your form by adding those two more fields ( note the required [id:customX] ):
Other required settings:
[#2] The above will make the (default WP comment) form look like:
Only the extra fields will be stored in the cforms tracking tables:
[#3] Now adjust your WP's comment.php template:
Add inside the LOOP:
<?php $xtra = cf_extra_comment_data(get_comment_ID()); ?>
The data array $xtra can now be referenced, e.g. right after the comment_author_link() in this example:
— <?php echo ' Agreed: '.($xtra['My custom checkbox']<>''?'Yes':'No'); ?>
[#4] Outputs:

6:39 pm
Oh yes it would be very usefull ! or at least could you be more precise with the syntaxe to use and why not examples so that we could display more easily the content of extra fields.
The most complicated is not to edit extra fields in a form but to insert the" php echo tag" in the template. As for me the "snag" especially concerns the end of the call ![]()
<>''?'Yes':'No'); ?>
to adpapt that code portion to my requirements (a select box with a first negative option for "select in the list").
Tx in advance.
9:10 pm
Hi, being this my first post: thank you so much for this incredible plugin & the great support. Your plugin enables WP to go beyond the label as publishing platform to be a “capturing” platform! ;-)
My observation to this feature:
either tracking is working or is the WP-Comment. Enabling both at the same time results in inserting comments (& mail notification) but without tracking the entries in the DB.
As I haven’t yet see it in action, I understand that the extra fields are added only to the tracking table but not inserted in the wp_commentmeta? Perhaps a desirable feature? Why did you opt for only inserting the extra fields into the CF-DB?
My configuration: WP 2.9.1 & CF 11.3
LG,
Adrián
7:13 am
March 6, 2005
Offlineboquiabierto said:
Hi, being this my first post: thank you so much for this incredible plugin & the great support. Your plugin enables WP to go beyond the label as publishing platform to be a “capturing” platform! ;-)
My observation to this feature:
either tracking is working or is the WP-Comment. Enabling both at the same time results in inserting comments (& mail notification) but without tracking the entries in the DB.
no, both generally works, tracking data & using the WP comment feature. otherwise this tutorial would be pointless, no? ![]()
As I haven’t yet see it in action, I understand that the extra fields are added only to the tracking table but not inserted in the wp_commentmeta? Perhaps a desirable feature?
absolutely not. that would mean that cforms would have to alter your core WP comment tables which is really bad and can cause all kinds of trouble down the path.
Why did you opt for only inserting the extra fields into the CF-DB?
security, upgrade-abilty etc.
My configuration: WP 2.9.1 & CF 11.3
LG,
Adrián
Most Users Ever Online: 959
Currently Online:
83 Guest(s)
Currently Browsing this Page:
3 Guest(s)
Top Posters:
tracedef: 43
mores: 21
Gyrus: 20
frozenwaste: 18
asuffredini: 15
photoworks: 14
Member Stats:
Guest Posters: 3549
Members: 1464
Moderators: 3
Admins: 1
Forum Stats:
Groups: 1
Forums: 4
Topics: 5158
Posts: 18388
Newest Members: juredujmovic, dreamkeeper, rajattyagi, wrokaa, lukass
Moderators: Paul (421), cnymike (8), sonika (95)
Administrators: Oliver (6398)
FAQs
Home
Add Topic















