News:

Wondering if this will always be free?  See why free is better.

Main Menu

Custom Form Mod

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

Previous topic - Next topic

FragaCampos

Normally, that happens when you change the id of a group or create a new one. It's a known bug, so you must build the forms' permissions every time you change your group members.

Saiyan1337

Im not sure why Im getting this error. The site was installed last night and is running 2.0.1. The theme is 2.0.1 as well.


DanCarroll

#1422
Installed the Custom Form Mod and it works as far as the Modifications Settings => Custom Forms go. My problem is I can't get the forms action to work. I am new to this and using SMF 2.0.1. Shouldn't "index.php?action=forms" work?


EDIT: Fixed! The instructions with the mod say to use "index.php?action=forms" but doesn't work. Checked with the mods index and the note there says to use "form", not the plural 'forms'. Changed it and it works fine. Thanks everyone.

DanCarroll

#1423
Database Integration

Has anyone been able to use this mod to integrate with, or post to, a data file? I would love to be able to use some forms for data collection.


ADD: Okay, I see that the Custom Form Mod is designed to post to Boards. I see that the creator as posted "At some point we will write a tutorial explaining how to create a stand alone form and database and information page, that ties to SMF and can even create a forum post." on his website.  Now if I can just find something like that.

dorje77

Quote from: DanCarroll on October 24, 2011, 10:23:57 AM
Database Integration

Has anyone been able to use this mod to integrate with, or post to, a data file? I would love to be able to use some forms for data collection.

I use this mod to obtain posts/thread in a hidden section (ignored by the index: http://forum.artistimarziali.net/index.php?board=121), that are then read by another script (via SSI) to display as records in a particular page:

http://www.artistimarziali.net/?page=eventi

A second form is used with a similar system to collect data for a map:

http://www.artistimarziali.net/?page=scuole

DanCarroll

Thanks dorje77. I may look into your solution sometime. I really need a standalone form (page) with database access that will integrate with SMF. Looks like a project I might have to complete on my own. But the creator of Custom Form Mod posted this on his website: "At some point we will write a tutorial explaining how to create a stand alone form and database and information page, that ties to SMF and can even create a forum post."

If only that was available now.

dorje77

Quote from: DanCarroll on October 24, 2011, 01:00:05 PM
Thanks dorje77. I may look into your solution sometime. I really need a standalone form (page) with database access that will integrate with SMF. Looks like a project I might have to complete on my own. But the creator of Custom Form Mod posted this on his website: "At some point we will write a tutorial explaining how to create a stand alone form and database and information page, that ties to SMF and can even create a forum post."

If only that was available now.

But why you want to use Custom Form? It's purpouse is to generate posts in boards with "blocked" fields/layout. If you have to connect to another database, the best way is to forward users to another form.

If you prefer Custom Form just for SMF theme integration, it is easy moddable also to work with other databases. :)

frytec

For SEO porposes, i need to set up title for the form page.

so im wondering, how can i make the title bar show the form name, and not the url of the form?

thanks.

DanCarroll

dorje77, thanks for the interest. Was just looking for a shortcut to creating forms tied  to database. Unless I come up with something else,
I will have to hand-craft the form. Maybe a mod to act as a database manager complete with a form & report editor? Hmmm, that's an idea.

DanCarroll

frytec, the Custom Form Mod Settings -> View Forms Title setting will show up as the page title. Other than that, only thing I can think of is to hand-code an
action/template combo and code in your Page Title there.

frytec

Dan, that setting is for the list of forms, i need title to each form.

DanCarroll

Well frytec, I'm sure it could be done but may have to mod the mod. Or code it by hand. May not really need coding but some file additions, mods, to have
it show up as the Page Title.

Have you done any file manipulations already to get what you want? Try a search on adding a page title to custom actions.

Let me know how it goes. I have some mods to mods in mind myself now. I don't allow guest access and some mods show themselves up in the Guest
login. I need to hide this so will search the mod boards for others who may have already done this. Or will do it by hand with an idea to update the
individual mods.

DanCarroll

#1432
Hey frytec, I have your answer. Are you ready?

Edit CustomForm.php in Sources. Go to the bottom of the file and look for the following:

// Set the page title, just for lolz! :D
$context['page_title'] = (isset($modSettings['CustomForm_view_title']) &&
    ($modSettings['CustomForm_view_title'] != '')) ? $modSettings['CustomForm_view_title'] :
    $txt['CustomForm_tabheader'];

**Did you find it? Insert this line:
$context['page_title'] = $form_title;
And comment out the last line. You only need 1 page_title. Of course, if you put the new line for the page title under the old one it take precedence.
Have fun! And in case these instructions don't make sense, here is what the last few lines of my CustomForm.php file looks like.

// Set the page title, just for lolz! :D
$context['page_title'] = $form_title;
//$context['page_title'] = (isset($modSettings['CustomForm_view_title']) && ($modSettings['CustomForm_view_title'] != '')) ? $modSettings['CustomForm_view_title'] : $txt['CustomForm_tabheader'];
}
?>

DanCarroll

How about a correct link tree AND page title?

Edit the CustomForm.php and replace

// Set the page title, just for lolz! :D
$context['page_title'] = (isset($modSettings['CustomForm_view_title']) &&
                ($modSettings['CustomForm_view_title'] != '')) ? $modSettings['CustomForm_view_title'] : $txt['CustomForm_tabheader'];


with

// Set the page title, just for lolz! :D
$context['page_title'] = (isset($modSettings['CustomForm_view_title']) &&
                ($modSettings['CustomForm_view_title'] != '')) ? $modSettings['CustomForm_view_title'] : $txt['CustomForm_tabheader'];

// setup the link tree to follow the form
$context['linktree'][] = array(
'url' => $scripturl. '?action=form',
'name' => $modSettings['CustomForm_view_title'],);

if ($form_title != "")
{
$context['page_title'] = $form_title;
$context['linktree'][] = array(
'url' => $scripturl. '?action=form;sa=n=1',
'name' => $form_title,);
}



DanCarroll

Modifying the Custom Form mod was fun and educational. Now I would like to be able to have a form open in the same browser tab. Does anyone have a fix for this?

frytec

#1435
DanCarroll, thank you dude.. It works 100%! Nice job with the title and linktree.
Only one more question, how can i add a linktree before the form name?
MySite > MyForm1


About your question, what do you mean by "open in the same browser tab"? Here all my forms opens in same tab.


Saiyan1337

Can we get this updated for 2.0.1 ??? i also have uninstall some mods so i dont get errors... thats not right

Saiyan1337

Bump. If I seem impatient its because my clan is in dire need of this working again. So I'm sorry if I do seem impatient.

drguild

Looking at the form seems cool one thing letting me down on my requirements.

Image upload.

We run a minecraft game server and want to use this form mod to take place of user registrations as new members keep not posting there requests properly as we have a set of questions linked about 4 times around the place and there still like posts the crappy threads of 'can I be member'

Our server requires that all potential players can prove they can build before we even consider there application and is done on a screenshot.

Sure we can have players link to external sites like imgshack etc but we have been using the inbuilt smf system to upload images and if theirs a way to integrate that into this form id like to know thanks.

r2d2-trader

i would also appreciate if there is a possibility for uploading/inserting images similar like using the 'inline attachments mod' mod for attachments in topics. So a special upload 'box' would be great.

some ideas?

8) Rob
"Aller Anfang ist leicht, und die letzten Stufen werden am schwersten und seltensten erstiegen."
Johann Wolfgang von Goethe

Advertisement: