News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Custom Form Mod

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

Previous topic - Next topic

Garou

I personally didn't like Mambo/Joomla when I tried them out a couple years ago. There were way too many issues bridging SMF into it properly. That said I know absolutely nothing when it comes to making them work with SMF now.

There is a bridge support board here on SMF where there are people much more knowledgeable about these things then I.

Sorry  :(

FireDitto

I'm loving this mod.


My only request at the moment, would be the ability to organise the way in which the Forms are listed, instead of it defaulting to the order you create them in.


Also, my Astrix aren't red... and they appear under the box that is required. I've included a Screenshot.
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

Spinx Haplo

Is it possible to have the porm post to an already existing topic, not just board?  Also, what I would really like to be able to do is make it post to an existing post and simply add the data to that post in a table.  Maybe too much for this mod, but I had to ask.

Garou

FireDitto, the asterisks for the required fields aren't supposed to show as red until a user has submitted the form without the required fields being filled out.

Spinx Haplo, having a form post to a single thread rather then a board has been discussed and is on the very long to do list that we have for future updates. I'm not sure when we will be able to get it in though.  As far as getting a form to update a table in a single post... Its not impossible but its beyond what this mod was originally created for and due to the specific nature of it, it would probably be best to have it custom designed for your site or at the very least as a separate mod. In which case you should pop it up in the Mod Requests board.

Spinx Haplo

Thanks Garou.  I did post in the mod requests, and wasn't getting much of any response.  I finally held my mouth right with a search and came up with your mod.  Sorry I didn't read the entire thread otherwise I would have seen it was discussed before.  Thanks for your effort, as this seems to be an excellent mod.  Even if it put them all in the same thread, I could then modify / compile the posts via moderation.  Not a perfect fix, but doable.  Maybe if the custom form could be embedded into a thread like a poll currently is.  Wish I was better at programming, I would try to assist.

Thanks again

digit

#625
Is there no way to attach an image?

Also, I have my fields set to required, yet, I fill them ALL in and I get the blank form again, with red asterisks - any idea why?

Thanks in advance.
Happily using a heavily modified 1.1.16 version of SMF!

2748011 Posts in 320998 Topics by 50986 Members


SOLD my website - thanks it was a good run - they converted to vbadvanced. (and screwed it up good!)

Garou

Digit, attachments are not possible at the moment but it is being looked into for the future. It is possible to use the form to link to an image that is hosted elsewhere.
Quote from: Garou on February 22, 2009, 10:34:12 AM
You have to enter parse_bbc in the Extra Type Parameters field for this to work right.

Example...
Title: image
Text: Please enter the link to your image here.   
Type: Text Box (String)
Extra Type Parameters: parse_bbc

Then in the Form Output: you would enter
[img]{image}[/img]

Images will post from the form to your forum this way, no changes to the mod necessary.  :)

The only thing I can think of that is causing the required fields to fail is if there's an error in the CustomForm.template.php. Have you modified or added any custom templates to it? Go a head and attach yours and Ill see if I cant figure it out.

digit

I don't think I modified it at all...  It is a pretty old version though I am sure....   here it is - thanks....

Also - if you could get image attachment to work, I would use the mod  8)  for my particular application - I NEED it!  :P

THANKS!
Happily using a heavily modified 1.1.16 version of SMF!

2748011 Posts in 320998 Topics by 50986 Members


SOLD my website - thanks it was a good run - they converted to vbadvanced. (and screwed it up good!)

digit

For the record, I just uninstalled v 1.1 and installed 1.4 - and it seems to be working fine now....  but I would LOVE to see an image attachment feature!  8)
Happily using a heavily modified 1.1.16 version of SMF!

2748011 Posts in 320998 Topics by 50986 Members


SOLD my website - thanks it was a good run - they converted to vbadvanced. (and screwed it up good!)

Garou

Like I said its on the to do list. It probably wont make the next version as I'm almost done coding it but if possible I will try to get it in the one after that. Attachments have been asked for here multiple times so if its possible it will be done eventually. :)

digit

Quote from: Garou on July 07, 2009, 08:55:56 AM
Like I said its on the to do list. It probably wont make the next version as I'm almost done coding it but if possible I will try to get it in the one after that. Attachments have been asked for here multiple times so if its possible it will be done eventually. :)
>:( :-X :-[  ;D

One other request...  a field that is simply a break...  where you can enter some text like ....

<hr> or <br />
Happily using a heavily modified 1.1.16 version of SMF!

2748011 Posts in 320998 Topics by 50986 Members


SOLD my website - thanks it was a good run - they converted to vbadvanced. (and screwed it up good!)

German_AC

Hi, here is the corrected version of spanish language file. There was a problem with the previous version regarding to accents. Sorry.




Artificial intelligence is not a rival for natural stupidity.

FireDitto

Quote from: FireDitto on June 27, 2009, 07:49:00 PM
I'm loving this mod.


My only request at the moment, would be the ability to organise the way in which the Forms are listed, instead of it defaulting to the order you create them in.


As I asked earlier [I think it was missed] is it possible to have the Form List organizable? At the moment they are listed in whatever order they're made in, and my list is quite messy and I'd rather not go through and delete them all simply to tidy it up.

Would this be something you can add to the next release?
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

Garou

FireDitto, you are correct I only answered half of your last post. Sorry about that. I don't think it will make the next release but Ill see if its possible for the one after. The ability to reorder the form list is going to be a pretty complicated one to figure out and will take me a little time. It will get done some time in the future and I have actually started working on that as I had the same problem on my test site several months ago.

German_AC, thanks I never would have noticed that as I don't speak the language.  :)

digit, Ive got that one already coded into the next version, there is going to be a "No User Input" field type. That way an admin can enter extra instructions or anything else between the questions in the form.

Just to update the version Ive got coded on my test site now includes a few new field types, the language translations that have been  posted here, a drop down board list so admins no longer have to go looking for board id numbers and the bit I'm working on now is topic icons. The icons are causing me fits, trying to make it work and will be the last bit I put in this version. If I don't get it figured out soon then I'm going to leave it out and try it for the version after.


FragaCampos

Great work Garou  8)

Just one thing, did you manage to tackle the problem of http:// in image and url tags?

FireDitto

Quote from: Garou on July 08, 2009, 07:04:29 AM
FireDitto, you are correct I only answered half of your last post. Sorry about that. I don't think it will make the next release but Ill see if its possible for the one after. The ability to reorder the form list is going to be a pretty complicated one to figure out and will take me a little time. It will get done some time in the future and I have actually started working on that as I had the same problem on my test site several months ago.

Okay, that's awesome. I look forward to it!
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

bros

Tried to install on SMF 2 RC1-1:
Database Error
Table 'xxxx_smf1.cf_forms' doesn't exist
File: /home/xxxx/public_html/boards/Packages/temp/install.php
Line: 45

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0 RC1-1, while your database is at version 2.0 RC1. The above error might possibly go away if you execute the latest version of upgrade.php.

Garou

Bros, you will need to manually remove the two cf databases in smf. If you have data in them that you want to use back them up first.

Then install the mod and drop the databases back in. If you dont want to use the old info and want to start fresh then you do not need to install the old DBs.

As for your database not being up to date that has nothing to do with the mod. Look for the thread about upgrading to 2.0 rc1-1 elswhere in this forum.

bros

Quote from: Garou on July 13, 2009, 05:50:23 PM
Bros, you will need to manually remove the two cf databases in smf. If you have data in them that you want to use back them up first.

Then install the mod and drop the databases back in. If you dont want to use the old info and want to start fresh then you do not need to install the old DBs.

As for your database not being up to date that has nothing to do with the mod. Look for the thread about upgrading to 2.0 rc1-1 elswhere in this forum.

Thanks, that did it.

I didn't need to rerun the upgrader, it just needed to have those tables removed.

bros

Okay. I know this isn't your job, but this errors with a mod I had made for me: topic description.

An Error Has Occurred!
The database value you're trying to insert does not exist: description

When I try to submit a form.

Would that require the mod to be tweaked around a bit? Maybe add a part to the custom forms table in the DB?

Here is the part that is probably causing the error, with the lines the error log is citing contained in asteriks:

// Insert the post. -Topic description MOD- query modified
$smcFunc['db_insert']('',
'{db_prefix}messages',
array(
'id_board' => 'int', 'id_topic' => 'int', 'id_member' => 'int', 'subject' => 'string-255',  'description' => 'string', 'body' => (!empty($modSettings['max_messageLength']) && $modSettings['max_messageLength'] > 65534 ? 'string-' . $modSettings['max_messageLength'] : 'string-65534'),
'poster_name' => 'string-255', 'poster_email' => 'string-255', 'poster_time' => 'int', 'poster_ip' => 'string-255',
'smileys_enabled' => 'int', 'modified_name' => 'string', 'icon' => 'string-16', 'approved' => 'int',
),
array(
******** $topicOptions['board'], $topicOptions['id'], $posterOptions['id'], $msgOptions['subject'],$msgOptions['description'], $msgOptions['body'],********
$posterOptions['name'], $posterOptions['email'], time(), $posterOptions['ip'],
$msgOptions['smileys_enabled'] ? 1 : 0, '', $msgOptions['icon'], $msgOptions['approved'],
),
array('id_msg')
******** );********
$msgOptions['id'] = $smcFunc['db_insert_id']('{db_prefix}messages', 'id_msg');

Advertisement: