Hi! Thanks for your useful plugin! I apologise for my bad english with russian accent :). I use Wordpress 2.6 with CForms 10.4.1. First of all: I have read faq, help files, all topics and post on this forum related with my problem but…
This is the code of dynamic form integrated with Quick Shop (from Quick Shop readme):
<?php /* here is an example from cForms help topics. i've edited it a little bit */
$fields = array(); $formdata = array( array('Your name[id:yourName]|Name','textfield',0,1,0,1,0), /* is required, auto clears on focus */ array('Your Email[id:yourEmail]|Email','textfield',0,1,1,1,0), /* is required, is email, auto clears on focus */ array('Your Order[id:yourorder]','textarea',0,1,0,0,1) /* is required, and is not editable */ ); $i=0; foreach ( $formdata as $field ) { $fields['label'][$i] = $field[0]; $fields['type'][$i] = $field[1]; $fields['isdisabled'][$i] = $field[2]; $fields['isreq'][$i] = $field[3]; $fields['isemail'][$i] = $field[4]; $fields['isclear'][$i] = $field[5]; $fields['isreadonly'][$i++] = $field[6]; }
/* inserting QuickShop-related strings */
if ($_SESSION['qscart'] && is_array($_SESSION['qscart'])) { foreach ($_SESSION['qscart'] as $item) { $forms .= ("".$item['name']." – ".$item['quantity']." pcs., ".$item['price']." each. "); }
} /* inserting is done. now – inserting the form */
insert_custom_cform($fields,'2'); /* 2 – is number of your form */
AJAX is swiched off, pages created like in code. I see form but there is no quick shop text areas. It's the trouble of cForms or Quick Shop? Or maybe the reason is that i'm using blog on localhost? Thanks!
Thanks a lot for a quick answer :) . Code in help file was valid. The problem was in localhost. CForms with Quick Shop are working excelent together on hosting.