Custom Form Mod

Started by live627, July 09, 2008, 10:24:44 PM

Previous topic - Next topic

Arantor

Which also has all kinds of options around custom fields for capturing whatever organisation you want it to have ;)

Shambles

Might be worth removing this section from the mod description, as the website quoted no longer seems to exist.


Quote
Tutorial:

Balance Games has provided a step by step tutorial on how to use the Custom Form Mod.
http://smf.balancegames.org/mods/forms/tutorial

langel

As I do to that increase the user post count with CFM? When you publish a post with custom mod form, does not increase the count :(

I have the latest version of the mod.

Thanks!
Me podran vetar de mil foros pero nunca me callaran!!

residualfuture

I have been trying to install this mod but I get nothing but errors:

1.    Adapt Database    install.php    
*    2.    Execute Modification    ./index.php    Test successful
*    3.    Execute Modification    ./Sources/Admin.php    Test failed
      1.    Add After    ./Sources/Admin.php    Test failed
      2.    Add After    ./Sources/Admin.php    Test failed
*    4.    Execute Modification    ./Sources/ManageSettings.php    Test failed
      1.    Add After    ./Sources/ManageSettings.php    Test failed
      2.    Add Before    ./Sources/ManageSettings.php    Test successful
   5.    Extract File    ./Sources/CustomForm.php    
   6.    Extract File    ./Themes/default/CustomForm.template.php    
*    7.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful
*    8.    Execute Modification    ./Themes/default/languages/Help.english.php    Test successful
   9.    Execute Modification    ./Themes/default/languages/Modifications.english-utf8.php    Skipping file
   10.    Execute Modification    ./Themes/default/languages/Help.english-utf8.php    Skipping file

I am running smf 2.0.9 any help would be greatly appreciated.

live627

Which mods do you have installed?

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Empire KickAss

I can't get this to work, it's not showing up at all.

It meant to be for Members_Introduce, but it does not show up. It's blank. I have been thought my settings and I can't found whats wrong with it after I read thought this topic thread still no luck
If I helped you out in anyway can u please click this up button arrow .Thank You!!!

#Mayhem

When members submit an application through Custom forms, the page is completely blank in the forum it's been sent to. I'm running 2.0.9. I made sure everything is correct, but the forum post that's being submitted is completely blank. However, when an admin submits the application, it appears in the form. This only happens with members who aren't admins.

Empire KickAss

Quote from: #Mayhem on February 27, 2015, 11:21:26 PM
When members submit an application through Custom forms, the page is completely blank in the forum it's been sent to. I'm running 2.0.9. I made sure everything is correct, but the forum post that's being submitted is completely blank. However, when an admin submits the application, it appears in the form. This only happens with members who aren't admins.
I have an problem where it is not showing up on the selection where I have the application to, witch is for the Members Introduce
If I helped you out in anyway can u please click this up button arrow .Thank You!!!

#Mayhem

Quote from: Empire KickAss on February 27, 2015, 11:24:18 PM
Quote from: #Mayhem on February 27, 2015, 11:21:26 PM
When members submit an application through Custom forms, the page is completely blank in the forum it's been sent to. I'm running 2.0.9. I made sure everything is correct, but the forum post that's being submitted is completely blank. However, when an admin submits the application, it appears in the form. This only happens with members who aren't admins.
I have an problem where it is not showing up on the selection where I have the application to, witch is for the Members Introduce

My problem is when someone submits the application itself, it's not showing up on the board/forums. It just comes up as a blank page.

Empire KickAss

Quote from: #Mayhem on February 28, 2015, 05:24:42 PM
Quote from: Empire KickAss on February 27, 2015, 11:24:18 PM
Quote from: #Mayhem on February 27, 2015, 11:21:26 PM
When members submit an application through Custom forms, the page is completely blank in the forum it's been sent to. I'm running 2.0.9. I made sure everything is correct, but the forum post that's being submitted is completely blank. However, when an admin submits the application, it appears in the form. This only happens with members who aren't admins.
I have an problem where it is not showing up on the selection where I have the application to, witch is for the Members Introduce

My problem is when someone submits the application itself, it's not showing up on the board/forums. It just comes up as a blank page.
the problem is gotta wait for an reply to the author or someone that knows an fix
If I helped you out in anyway can u please click this up button arrow .Thank You!!!

#Mayhem

Hello everyone,

I'm trying to figure out where I can edit the text box length on my Custom form. I'll add a screenshot of one of the custom forms applications and hopefully someone can tell me where I can edit the text box. I've been looking through the CSS and templates for the last couple hours, even FTP, and can't find where to edit them.


Empire KickAss

Any news on this yet? we have problems and waiting on answer from the post above
If I helped you out in anyway can u please click this up button arrow .Thank You!!!

Smythe

#1673
Getting error message....


The database value you're trying to insert does not exist: subject

I wasnt getting the message previously, but after I created a new form ... this is all I get...
Tells me the error lies at line 1817 of the code from Sub-Post.php

Error from Admin logs:


Apply Filter: Only show the error messages of this URL
http://mywebsite.com/index.php?action=form;n=1;submit;
Apply Filter: Only show the errors with the same message
The database value you're trying to insert does not exist: subject
Function: createPost
Apply Filter: Only show the errors from this file
File: C:///Sources/Subs-Post.php
Line: 1817


1803   // Insert the post.
1804 $smcFunc['db_insert']('',
1805 '{db_prefix}messages',
1806 array(
1807 'id_board' => 'int', 'id_topic' => 'int', 'id_member' => 'int', 'subject' => 'string-255', 'body' => (!empty($modSettings['max_messageLength']) && $modSettings['max_messageLength'] > 65534 ? 'string-' . $modSettings['max_messageLength'] : 'string-65534'),
1808 'poster_name' => 'string-255', 'poster_email' => 'string-255', 'poster_time' => 'int', 'poster_ip' => 'string-255',
1809 'smileys_enabled' => 'int', 'modified_name' => 'string', 'icon' => 'string-16', 'approved' => 'int',
1810 ),
1811 array(
1812 $topicOptions['board'], $topicOptions['id'], $posterOptions['id'], $msgOptions['subject'], $msgOptions['body'],
1813 $posterOptions['name'], $posterOptions['email'], time(), $posterOptions['ip'],
1814 $msgOptions['smileys_enabled'] ? 1 : 0, '', $msgOptions['icon'], $msgOptions['approved'],
1815 ),
1816 array('id_msg')
1817 );
1818 $msgOptions['id'] = $smcFunc['db_insert_id']('{db_prefix}messages', 'id_msg');
1819
1820 // Something went wrong creating the message...
1821 if (empty($msgOptions['id']))
1822 return false;


any help is greatly appreciated....


after looking I also see the following error message in the logs of the admin section

http://mywebsite.com/index.php?action=form;n=1;submit;
Apply Filter: Only show the errors with the same message
2: preg_replace_callback(): Unknown modifier 'T'
Apply Filter: Only show the errors from this file
File: C:///Sources/CustomForm.php
Line: 287
Line: 288
Line: 291
Line: 292


277                    // Do we have completly valid field data?
278 if(!$fail_submit)
279 {
280 require_once($sourcedir.'/Subs-Post.php');
281
282                //    {{ }} Syntax: Strip out everything in {{ }} if value is blank
283                $output = preg_replace($vars_blank, '', $output);
284                $subject = preg_replace($vars_blank, '', $subject);
285
286                //    {{ }} Syntax: Remove outside brackets if value is not blank
287                $output = preg_replace_callback($vars_non_blank, create_function('$matches','return substr($matches[0],1,-1);'), $output);
288                $subject = preg_replace_callback($vars_non_blank, create_function('$matches','return substr($matches[0],1,-1);'), $subject);
289
290 // Replace all vars with their correct value, for both the message and the subject.
291 $output = preg_replace($vars, $replace, $output);
292 $subject = preg_replace($vars, $replace, $subject);

dakey

Great mod  8) ..

but,
I have a board (let's say: board_id=10) and a certain usergroup is normally allowed to post only after approval by an administrator (Standard feature in SMF 2.x.x).
This works.

The same usergroup have access to my custom form and is able to send the form, but after sending, the topic is posted direct in board_id 10 without any approval by an administrator..
Any ideas to get this fixed?

Kindred

nothing to get fixed... the system is working exactly as expected.

The form submit does not relate to any standard posting permissions.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

dakey

Are you sure?
I've an image attached:

1. is a new topic in board_id 10 after I post with user x from the custom form (status: published)
2. is a new topic in board_id 10 after I post with the same user x on a regular way (Wachtend op goedkeuring) is dutch for (status: awaiting for moderation)

Kindred

Right. That illustrates what I just said.

The user in the membergroup can list to that board, but requires approval of the post.
Correct. This is standard smf behavior.

The same user can use the form to submit a post to the board. This post will NOT require approval.
Correct. This is the standard behavior of the form mod.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

420SA

Quote from: residualfuture on February 07, 2015, 01:05:46 AM
I have been trying to install this mod but I get nothing but errors:

1.    Adapt Database    install.php    
*    2.    Execute Modification    ./index.php    Test successful
*    3.    Execute Modification    ./Sources/Admin.php    Test failed
      1.    Add After    ./Sources/Admin.php    Test failed
      2.    Add After    ./Sources/Admin.php    Test failed
*    4.    Execute Modification    ./Sources/ManageSettings.php    Test failed
      1.    Add After    ./Sources/ManageSettings.php    Test failed
      2.    Add Before    ./Sources/ManageSettings.php    Test successful
   5.    Extract File    ./Sources/CustomForm.php    
   6.    Extract File    ./Themes/default/CustomForm.template.php    
*    7.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful
*    8.    Execute Modification    ./Themes/default/languages/Help.english.php    Test successful
   9.    Execute Modification    ./Themes/default/languages/Modifications.english-utf8.php    Skipping file
   10.    Execute Modification    ./Themes/default/languages/Help.english-utf8.php    Skipping file

I am running smf 2.0.9 any help would be greatly appreciated.

I get the same errors on the same version of SMF. Could SCEditor cause this?

dakey

Quote from: Kindred on March 27, 2015, 12:38:57 AM
Right. That illustrates what I just said.

The user in the membergroup can list to that board, but requires approval of the post.
Correct. This is standard smf behavior.

The same user can use the form to submit a post to the board. This post will NOT require approval.
Correct. This is the standard behavior of the form mod.

I understand, and that's why I asked for a custom solution for a moderation possibility.
In the meantime i found a solution which work for my board, because I use only 1 form:

find in CustomForm.php:

$msgOptions = array(
'id' =>  0,
'subject' => $subject,
'icon' => $icon,
'body' => $output,
'smileys_enabled' => true,


Add after:

'approved' => 0,

Advertisement: