News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Custom Form Mod

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

Previous topic - Next topic

live627

Quote from: Grendor on May 15, 2024, 10:52:01 PMI need a form with fields that only certain member groups can add to the form and see the form.
Admin or assigned groups should be able to delete entries.

I need a form or mod for people to request items they need stocked in our games market.
you can restrict individual forms but  not fields. Any given field will have the same access as their associated form.

But this mod won't satisfy all your requrirements.

shawnb61

I suspect the challenge here is the template form needed.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Grendor

Hey Guys,

Thanks for the help and info you supplied, I greatly appreciate it.

I guess I might have to request a custom mod to suit my needs.
I tried several mods and each had issues I could not work around.

Anyways thanks again for the help
Grendor

davo88


When the 'Submit Redirect' field for the form is set to 'thanks', the error below is generated. 
Doesn't happen when the 'Submit Redirect is set to 'forum'.
Any ideas for things to try?

PHP 8.2
SMF 2.1.4 - Default theme
TinyPortal 3.0
Custom Form Mod 4.06
Forum Width Setting
Board Sorting Method

Error Message
75d06f8fd0f4c4ef64e6454c30537cbe
 https://xx.xx.xxx.xxx/~douglasm/index.php?action=form;thankyou
 /home/douglasm/public_html/Sources/CustomForm/CustomForm.php (Line 155)  Backtrace information

Type of error: Undefined
Error messageSelect
2: Undefined array key "customform_tabheader"

Backtrace
Error
Type of error - Undefined_vars
Error message - 2: Undefined array key "customform_tabheader"
File - /home/douglasm/public_html/Sources/CustomForm/CustomForm.php
Line - 155
URL of page causing the error - https://XX.XX.XXX.XXX/~douglasm/index.php?action=form;thankyou

Backtrace information
#0: smf_error_handler()
Called from /home/douglasm/public_html/Sources/CustomForm/CustomForm.php on line 155

#1: ThankYou()
Called from unknown on line -1

#2: call_user_func()
Called from /home/douglasm/public_html/Sources/CustomForm/CustomForm.php on line

#3: __construct()
Called from /home/douglasm/public_html/Sources/CustomForm/CustomForm.php on line 52

#4: create()
Called from /home/douglasm/public_html/index.php on line 184

Thank you function in CustomForm.php
private function ThankYou(): void
 {
 global $context, $modSettings, $txt;

 $context['page_title'] = !empty($modSettings['customform_view_title'])
 ? $modSettings['customform_view_title']
 : $txt['customform_tabheader'];
 $context['linktree'][] = [
 'url' => $this->scripturl . '?action=form',
 'name' => $context['page_title'],
 ];
 $context['robot_no_index'] = true;
 $context['sub_template'] = 'ThankYou';
 loadTemplate('CustomForm');
 loadLanguage('CustomForm');
 }

Advertisement: