cforms II User Forum

Registration is currently disabled.
Guest

FAQs

Login form protected by Login LockDown.


Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

    

Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
Multiple Questions (insert_custom_cform, removing fields)
July 26, 2007
12:55 pm
Maligno
Guest

1.-Can't understand what the N means:

insert_custom_cform($fields,'N'); 

2.-Is it posible to erase every field in the administration options? I just whant to use the custom filds I created.

When I submit de form, I get two rows in the tracking. One with the only field i've got left in the form and the other with my custom fields.

 

Great, Great Plug-in! 

July 26, 2007
6:15 pm
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

1: N refers to the form # as defined via the cforms administration (1="", then starting with 2,3,4…etc)

2: When using the insert_custom_cform PHP call to insert the form, non of the form fields visible in the cforms administration should be considered, only what's being passed on in the $fields array.

I'll check the tracking options to see what's causing possible duplicate entries, stay tuned.

July 26, 2007
10:38 pm
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

I tried replicating your error with the form input (provided by the user) being tracked twice in the cforms tracking tables and can't see anything wrong. I only get one record per submission and only the fields that have been passed on the function.

August 9, 2007
9:06 am
Maligno
Guest

In the tracking I'v got this… 

118 MyForm the@email.com 2007-08-08 20:54:27 view
119 MyForm the@email.com 2007-08-08 20:54:28 view

submitting just one time the form.

118 has no fields, 119 has every field of the form.

 

In my page template, I put the fields inside the:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

but now is commented (also the ending of this php "if" and "while"). 

I also commented the line "the_content( …" because it shows the fields and the submit button of the form created with de system.

 

This is, that the form doesn't hide when I create my custon fields and even If I do something like commenting the line so to not show it, i get two submitions like I explained before.

The strange thing is that in the code, there is only one form not commented and I get two submitions.

What can posible do this?

 

Hope you can help! 

Thanks anyway! 

 

 

August 9, 2007
10:19 pm
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

Not sure I can help with this, as it seems extremely odd, but I'm happy to take a look at your URL. Can you post it please…

August 14, 2007
10:21 am
Maligno
Guest

Unfortunately I'm running WP on my computer. (No static IP, Not always on)

I've got this on my template page (evaluacion.php):
——————————————————--
<?php
/*
Template Name: Evaluacion
*/
?>
<?php get_header(); ?>
<?php
$identificador = empty($_GET['ev_id']) ? 'DESACTIVADO' : $_GET['ev_id'];
$prop = empty($_GET['ev_prop']) ? 'DESACTIVADO' : $_GET['ev_prop'];
$propu = empty($_GET['ev_propu']) ? 'DESACTIVADO' : $_GET['ev_propu'];
$eva = empty($_GET['ev_eva']) ? 'DESACTIVADO' : $_GET['ev_eva'];
?>
<div id="content" class="narrowcolumnPage">
<h2><?php the_title(); ?></h2>
<div class="entry">
<?php
$fields = array();
$fields['label'][0] ='Propuesta a Evaluar';
$fields['type'][0] ='fieldsetstart';
$fields['isemail'][0] ='0';
$fields['label'][1] ='T&iacute;tulo| '.$identificador;
$fields['type'][1] ='textfield';
$fields['isemail'][1] ='0';
$fields['isreq'][1] ='0';
$fields['isclear'][1] = '1';
$fields['isdisabled'][1] = '1';
$fields['label'][2] ='Nombre del Proponente | '.$prop;
$fields['type'][2] ='textfield';
$fields['isemail'][2] ='0';
$fields['isreq'][2] ='0';
$fields['isclear'][2] = '1';
$fields['isdisabled'][2] = '1';
$fields['label'][3] ='Resumen de la Propuesta | '.$propu;
$fields['type'][3] ='textarea';
$fields['isemail'][3] ='0';
$fields['isreq'][3] ='0';
$fields['isdisabled'][3] = '1';
$fields['label'][4] ='Criterios de Evaluacion';
$fields['type'][4] ='fieldsetstart';
$fields['isemail'][4] ='0';
$fields['label'][5] ='Claridad de la propuesta # Insuficiente # Regular # Bueno # Extraordinario';
$fields['type'][5] ='radiobuttons';
$fields['isemail'][5] ='0';
$fields['label'][6] ='Innovacion y creatividad de la propuesta # Insuficiente # Regular # Bueno # Extraordinario';
$fields['type'][6] ='radiobuttons';
$fields['isemail'][6] ='0';
$fields['label'][7] ='Viabilidad de la propuesta # Insuficiente # Regular # Bueno # Extraordinario';
$fields['type'][7] ='radiobuttons';
$fields['isemail'][7] ='0';
$fields['label'][8] ='Metodologia que garantice la realizacion de los objetivos # Insuficiente # Regular # Bueno # Extraordinario';
$fields['type'][8] ='radiobuttons';
$fields['isemail'][8] ='0';
$fields['label'][9] ='Comente otros aspectos relevantes del proyecto. (optativo)';
$fields['type'][9] ='textarea';
$fields['isreq'][9] ='0';
$fields['isemail'][9] ='0';
$fields['label'][10] ='Evaluador |'.$eva;
$fields['type'][10] ='textfield';
$fields['isemail'][10] ='0';
$fields['isclear'][10] = '1';
$fields['isreq'][10] ='0';
$fields['isdisabled'][10] = '1';
insert_custom_cform($fields,5); //call default form
?>
</div>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
——————————————————--

In the administration area, I've got just one field (Just text -no field-) Form 5

I have a page with the "evaluacion" template so the form appears.

When I submit the form, I receive 2 submitions in the tracking. A blank submition 

(without any fields) and the correct submition.

The form TAG is:
<form enctype="multipart/form-data" action="http://localhost/wp/?page_id=136#usermessage5a&quot; method="post" class="cform" id="cforms5form">

Hope this helps to understand the problem…

 

Thaaaaannkkks!! 

August 14, 2007
5:44 pm
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

Maligno, thanks for the additional data.

I've taken your PHP code 1:1 and only changed the form # from 5 to 2 (I only have a second one in my test env)

And it works perfectly fine (with your PHP!) here, so I suspect it has to do with either your form setup (#5) and/or something else with WP is buggy.

I'm happy to take a glance at your form config (I emailed you). 

Forum Timezone: Europe/Berlin

Most Users Ever Online: 959

Currently Online:
23 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

tracedef: 43

mores: 21

Gyrus: 20

frozenwaste: 18

asuffredini: 15

photoworks: 14

Member Stats:

Guest Posters: 3739

Members: 1463

Moderators: 3

Admins: 2

Forum Stats:

Groups: 1

Forums: 4

Topics: 5339

Posts: 18706

Newest Members: juredujmovic, dreamkeeper, rajattyagi, wrokaa, lukass

Moderators: Paul (421), cnymike (8), sonika (95)

Administrators: Oliver (6400), Nicky (3)