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
Added form name into form element for easier styling
August 3, 2010
1:34 am
twig
Guest

Hey there,

 

I've added the form name into the form tag so it is much easier to customise the styling per form, rather than by form ID.

 

I did this because I work on the development server and the IDs do not match the live ones.

Since the form names were consistent across both servers, I made a small change to the cforms code in order to make this work.

 

Hope this gets added to the next release.

I've added a patch here.

 

Index: wp-content/plugins/cforms/cforms.php
===================================================================
— wp-content/plugins/cforms/cforms.php    (revision 40)
+++ wp-content/plugins/cforms/cforms.php    (working copy)
@@ -352,7 +352,7 @@
     $enctype = $cformsSettings['form'.$no]['cforms'.$no.'_formaction'] ? 'enctype="application/x-www-form-urlencoded"':'enctype="multipart/form-data"';
 
     ### start with form tag
-    $content .= $ntt . '<form '.$enctype.' action="' . $action . '" method="post" class=").' cfnoreset':'' $cformsSettings['form'.$no]['cforms'.$no.'_dontclear']?' cform'.(" id="cforms'.$no.'form">' . $nl;
+    $content .= $ntt . '<form '.$enctype.' action="' . $action . '" method="post" class=".' sanitize_title_with_dashes($cformsSettings['form'.$no]['cforms'.$no.'_fname']) . ' ).' cfnoreset':'' $cformsSettings['form'.$no]['cforms'.$no.'_dontclear']?' cform'.(" id="cforms'.$no.'form">' . $nl;
 
     ### Session item counter (for default values)
     $sItem=1;

Forum Timezone: Europe/Berlin

Most Users Ever Online: 959

Currently Online:
26 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: 3762

Members: 1463

Moderators: 3

Admins: 2

Forum Stats:

Groups: 1

Forums: 4

Topics: 5359

Posts: 18740

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

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

Administrators: Oliver (6400), Nicky (3)