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

Garou

FragaCampos, #1 Ive been looking for this myself before I was given permission to work on the mod and I cant find anything in the mod forcing the limit  :(

With #2 you do have some control using the Extra Type Parameters and the checkbox. You can enter "The box was checked,The box was not checked" or possibly try  "The box was checked,"

Enders, This has been covered by me after your last post and by the original author to another user a while back and plain and simple its not going to happen. The point of this mod is to create preformated posts based on user responses. As a users answers are not stored in a database but posted to the forum using the post function its not possible to post to content anywhere else.

Suggest it in the help wanted board and maybe someone will want to create a mod that outputs forms to a database for display in another page.

FragaCampos

#581
Quote from: Garou on May 31, 2009, 11:00:39 AM
FragaCampos, #1 Ive been looking for this myself before I was given permission to work on the mod and I cant find anything in the mod forcing the limit  :(

Oh well... we'll have to work with what we have ;)

Quote from: Garou on May 31, 2009, 11:00:39 AMWith #2 (...) or possibly try  "The box was checked,"

I already tried that and it won't work, it still returns a "No" if the checkbox is not selected... :(


Another thing i just noticed:
Would it be possible to be able to input a blank field in the selection box, so that we can return nothing if we select the empty field?

Spinx Haplo

OK, finally fixed an issue I was having after install, and trying to admin.  Am using 2.0 1-1, and when it puts the "function CustomFormSettings" in the ManageSettings.php file, it puts it after the php end carat "?>" (outside of the php statement)  Sorry, am a noob, so not sure of the correct phrasing.  I moved the "?>" after the function (back at the end of the file) and it started working corectly again.  Also, as previously stated, if you uninstall and reinstall the mod, it will not reinstall correctly unless you manually drop cf_fields and  cf_forms from the database. Looks like the install.php needs an "if exist drop table" or something like that

Garou

FragaCampos, you know the whole point of this is to get people to fill out the form. Why go to all the trouble to allow people not to fill out the data. I often use the default string, the first selection in a select box, or an unchecked check box to harass the users who don't fill out the form completely. Stuff like "The user was too lazy to fill this out".  :)

Spinx Haplo, the database problem is actually a problem with SMF not the mod there are other mods that have this issue as well. It should be fixed in an updated release of SMF, they missed it in the last one as they were in a rush to plug a security breach.

As for code not being entered in the correct place sometimes that happens when you uninstall and reinstall a mod. Ive had this happen myself with other mods I couldn't decide if I really wanted them or not, I don't know why it happens. I'm going to guess that it might have to do with mods that were installed prior to the mod being uninstalled.

When removing a mods you really should uninstall all mods installed after it in the reverse order they were installed, then reinstall them after the mod you no longer wanted to use is removed. Personally I now have a test server set up just for this reason and I never install a mod on a live server until I'm sure its what I want. Its rare that I have to uninstall a mod on a live server anymore and when I do its usually due to an SMF update that is no longer compatible with an existing mod. :)

Spinx Haplo

Actually the "function" problem started at first install

EDSucation

Hi, I need a bit of help using this.
I'm trying to set it up so that my users can post the following in a new topic:



Doctor's
-

  • Name:
  • Phone Number:
  • Fax Number:
  • Address 1:
  • Address 2:
  • City:
  • State:
  • Country:
  • Specialties:
  • Website:


But I don't see anywhere to edit the fields of the form, or how to make the form the mandatory way to START a topic on the board. (obviously I don't want someone to have to reply with a doctor, I want them to be able to comment regularly.)

Thanks,
EDSucation

FragaCampos

#586
Quote from: Garou on May 31, 2009, 08:39:28 PM
FragaCampos, you know the whole point of this is to get people to fill out the form. Why go to all the trouble to allow people not to fill out the data. I often use the default string, the first selection in a select box, or an unchecked check box to harass the users who don't fill out the form completely. Stuff like "The user was too lazy to fill this out".  :)

Garou, there many, many situations where the option of "none selected" in the selection box would be useful, if not essential.
I have two forms (for now) that would required that, because sometimes there are situations where you don't need to choose anything from the selection box, and if you don't choose anything, the form will still insert the first field :/
Example: Imagine you have a form with two selection boxes to choose between two days. But there are times when you only need to choose one day of the month, how do i do that without choosing the first day of the second selection box?
Do you think it would be difficult to implement this?

@EDSucation, that's a very easy form to build. Just follow this tutorial:
http://www.simplemachines.org/community/index.php?topic=248871.msg1633514#msg1633514


Garou

Spinx Haplo, Im not sure what the issues is then, it was just a guess anyway.  :-[ I haven't had a chance to test this on rc1-1 but under rc-1 it installed perfectly. Either something has changed in the way rc1-1 installs a mod causing a conflict with this or it was just a fluke. *shrug*

EDSucation, I was just going to suggest the same link FragaCampos did.  ;D When I first started using this mod it helped me out a lot.

FragaCampos, Ill add it to my to do list and see if something can be figured out. In the meantime I suggest you make the first answer "None", "N/A", or something along those lines. You could even set up a text box and just let the the user fill it out.

FragaCampos

Quote from: Garou on June 01, 2009, 10:32:53 AM
FragaCampos, Ill add it to my to do list and see if something can be figured out. In the meantime I suggest you make the first answer "None", "N/A", or something along those lines. You could even set up a text box and just let the the user fill it out.

Unfortunately, those options won't do, because they will return a value, and the idea is not to return anything at all.
Here's a practical example: i have a selection box to insert the name of a channel in the subject area, but only if the channel is known or available. As it is now, i'm obligated to choose one from the list or choose a text box (which is not so good for the purpose i want). This is an example, but there are many others...

willerby

Don't you just make the first option "Not available" or "Not known" or is that too simple?

Why code when you can work around what you have...
What type of washing machine is September?

An autumnatic. :)

alfzer0

Quote from: FragaCampos on June 01, 2009, 05:32:16 PM
Quote from: Garou on June 01, 2009, 10:32:53 AM
FragaCampos, Ill add it to my to do list and see if something can be figured out. In the meantime I suggest you make the first answer "None", "N/A", or something along those lines. You could even set up a text box and just let the the user fill it out.

Unfortunately, those options won't do, because they will return a value, and the idea is not to return anything at all.
Here's a practical example: i have a selection box to insert the name of a channel in the subject area, but only if the channel is known or available. As it is now, i'm obligated to choose one from the list or choose a text box (which is not so good for the purpose i want). This is an example, but there are many others...
I can almost accomplish this with the addition to the code I wrote about a bit earlier in the thread creating a custom template that adds a blank choice to every select box.  Problem is currently it errors and returns to the form if the choice is left blank as the rest of the code expects there to be a non-blank value from a select box.

azinoobrus

How can i get russian support language? (Russian_UTF8). Cuz after i'll entering something in forms its look like "????? ?? ?????". Need something supporting Cyrillic symbols...

Garou

azinoobrus, I don't speak Russian at all. I can offer is this...

Youll want translate the code that goes into
./Themes/default/languages/Modifications.english-utf8.php
./Themes/default/languages/Help.english-utf8.php
Check out http://custom.simplemachines.org/mods/index.php?action=parse;mod=1279;attach=89987;smf_version=1.1.8 to find the code.

Youll want to look for lines like...
$txt['CustomForm_generalsettings_heading'] = 'Custom Form Mod Settings';

And change it to...
$txt['CustomForm_generalsettings_heading'] = 'Установки Mod индивидуальной формы';

Sorry if the translation is a bit off but that's what I got from http://babelfish.yahoo.com.  :)

Then you'll want to add your translated code to
./Themes/default/languages/Modifications.russian-utf8.php before the ?>
./Themes/default/languages/Help.russian-utf8.php after...
$helptxt = array();

azinoobrus

#593
Ye i got it. But i mean Cyrillic symbols like "игдж". Mod is already translated, its easy, but he is not supporting  Cyrillic symbols in forms at all.
You can check it out here "hxxp:granat-lupanovo.ru/index.php?action=form [nonactive]" latin symbols looks fine, but Cyrillic...
If i'll make a simple question like "Yes or no?" and form tab it will be look great. But if i'll make question "Да или нет?"(It's the same thing like "Yes or no?") then it's will be look like "?? ?? ??"
and sorry for my english

Garou

Well I tried to test this using  Babel Fish. According you the translation of your site you haven't created any forms yet.

On my test server The questions in the form show correctly but the Form Output changes the symbols to their HTML code equivalent. For instance becomes "Да или нет?" "Да или нет?"

I have no Idea why this is. Mind you I haven't installed the SMF Russian language pack on my site as I wouldn't understand it anyway, that may be why Im getting the HTML code for the symbols.

Have you asked anyone in the Russian boards here? Do to my lack of understanding of the language I'm really at a loss as how to help here.  :(

FragaCampos

Quote from: willerby on June 01, 2009, 05:46:25 PM
Don't you just make the first option "Not available" or "Not known" or is that too simple?

Why code when you can work around what you have...

It's not a matter of simplicity but effectiveness. If a documentary doesn't have a channel, i.e, was produced and released as it is, without being broadcasted on tv, why should i put "Not availabe or "Not known"?  ::)

.Vapor

I just upgraded my forums to smf 2.0 rc1.1 and i get this while trying to install on "Core default" theme:


1.     Adapt Database     install.php     
*2.    Execute Modification    ./index.php    Test successful
1.    Add After    ./index.php    Test successful
*3.    Execute Modification    ./Sources/Admin.php    Test failed
1.    Add After    ./Sources/Admin.php    Test successful
2.    Add After    ./Sources/Admin.php    Test failed
*4.    Execute Modification    ./Sources/ManageSettings.php    Test successful
1.    Add After    ./Sources/ManageSettings.php    Test successful
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
1.    Add Before    ./Themes/default/languages/Modifications.english.php    Test successful
*8.    Execute Modification    ./Themes/default/languages/Help.english.php    Test successful
1.    Add After    ./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 downloaded the custom form version for 2.0 also

pinoypetfinder

Quote from: EDSucation on June 01, 2009, 12:21:32 AM
Hi, I need a bit of help using this.
I'm trying to set it up so that my users can post the following in a new topic:



Doctor's
-

  • Name:
  • Phone Number:
  • Fax Number:
  • Address 1:
  • Address 2:
  • City:
  • State:
  • Country:
  • Specialties:
  • Website:


But I don't see anywhere to edit the fields of the form, or how to make the form the mandatory way to START a topic on the board. (obviously I don't want someone to have to reply with a doctor, I want them to be able to comment regularly.)

Thanks,
EDSucation


was looking for the same thing - for our classified ad section board.
i checked the link that they gave http://www.simplemachines.org/community/index.php?topic=248871.msg1633514#msg1633514 but i am not sure if it will display on a start new topic page  ???  and also, is it possible to have this "form" appear only on selected boards? (like for example, ad section board?)

.Vapor

Quote from: V@POR on June 08, 2009, 01:39:18 PM
I just upgraded my forums to smf 2.0 rc1.1 and i get this while trying to install on "Core default" theme:


1.     Adapt Database     install.php     
*2.    Execute Modification    ./index.php    Test successful
1.    Add After    ./index.php    Test successful
*3.    Execute Modification    ./Sources/Admin.php    Test failed
1.    Add After    ./Sources/Admin.php    Test successful
2.    Add After    ./Sources/Admin.php    Test failed
*4.    Execute Modification    ./Sources/ManageSettings.php    Test successful
1.    Add After    ./Sources/ManageSettings.php    Test successful
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
1.    Add Before    ./Themes/default/languages/Modifications.english.php    Test successful
*8.    Execute Modification    ./Themes/default/languages/Help.english.php    Test successful
1.    Add After    ./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 downloaded the custom form version for 2.0 also

Anyone have any ideas on this ?

Garou

V@POR, you probably have another mod that is conflicting with the install of this one and will have to enter the code manually. Install the mod anyway then check http://custom.simplemachines.org/mods/index.php?action=parse;mod=1279;attach=89986;smf_version=2.0_RC1-1 for the changes to the failed file.

pinoypetfinder, Its been stated many times that the mod does not currently work with the new topic button. Not to say that it never will but for now I haven't been able to figure it out.

A form doesn't display on any board it displays in its own page such as "your forum/index.php?action=form;id=1" the data entered into the form will only be posted in the board that you tell it too. Also each particular form only posts to one board (of your choosing).

To force your users to use a form to post to a board first edit the board settings for that board to either read only or reply only. That way a user can not post a new topic to the board. Then create a sticky post with a link to the form. Alternatively in SMF 2.x, in the board settings, you can create a board that is a link rather then an actual board. You can then use that to link to your form.

Advertisement: