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

Malodorous

This is a really great mod from what im reading, i just installed SMF for my WoW guild. I really need something like this so i can set up a application system of some sorts.

Does anyone know any other mod that will do this?

If not i guess i will be checking this every say :)

Nvb

That checkbox error only exists in IE.
Just replce the cjeckbox with a selection box (Yes, No) and it will be fine.

Garou

#362
the.basement, actually you can leave it blank and it will post yes if checked and no if not but either way it should not be causing a problem for you.

It would have made sense to me if it was not displaying correctly on a custom theme but the fact that you are having issues on the default theme with a clean install really has me baffled.

Malodorous, the only other mod I found that comes close to this is Thurnok's Custom Post Prefills. Unfortunately he has no plans to make an actual mod,you have to enter it all in by hand.

It isn't anywhere near as nice as this mod either but it is what I use to use for guild applications and support boards before I found the custom form mod.

NeQo, nice catch. I didn't even think to check the bug on IE as FF is my default browser.

the.basement

stupid!

normal i check on the two browsers.
and yes explorer is interp it wrong.
in FF it's no problem at all
now i have a Clo what i have to search for, but it won't be easy.
i have to check what the difference in interpretation between both is!

MrMusic

Hello, first this is a great Mod. It is going to work perfectly with my need on my site.

I am using the Movies07 design by Bloc.
My version of SM is 1.1.7

Problem: I can not get it to work.

Is this designed to work with my version and Mod? If not, can you give me advice on how to make it work?

Thanks...

Ashley
[email protected]
www.mrlivemusic.com

Garou

First define not working. Are you getting errors in your logs, can you get to part of the features and it fails or what? Specifics would go a long way towards us helping you.

If the Mod does work under the default theme most likely you'll have to make some manual changes to the custom theme your wanting to work with. There are manual install instructions on the download page also there is a link to even more information about manual installs in my signature.

the.basement

#366


I was working on a new code to make the checkbox also working in IE.
On the way to rewrite a hole new set of code-lines i had a error in the script.
Checking the original to find where a code was pointing to, serveral days later and staring to
the original code.

I saw that the code did't close itself.
Closed the code and don't worry be happy, several days on making a new code going to the trashcan.
The code is working how the author wanted it to be.

find in CustomForm.template.php
// Show a check box?
if ($field_data['type'] == 'checkbox')
echo '
<input type="hidden" name="', $field_name, '" value="0" /><input type="checkbox" name="', $field_name, '" id="', $field_name, '" class="check" ', ($field_data['value']) ? 'checked="checked"' : '', '" />';


replace
// Show a check box?
if ($field_data['type'] == 'checkbox')
echo '
<input type="hidden" name="', $field_name, '" value="0" /><input type="checkbox" name="', $field_name, '" id="', $field_name, '" class="check" ', ($field_data['value']) ? 'checked="checked"' : '', ' />';


that's all there is!

and a small repeat for the required field setting to work,
here is the code i found earlier

find  in CustomForm.php
// Do we have an invalid value? Is this field required?
if(($required
&& (($value == '') || ($value == 0))
&& ($field['type'] != 'checkbox'))


replace
// Do we have an invalid value? Is this field required?
if(($required
&& (($value == '') || ($value == '0'))
&& ($field['type'] != 'checkbox'))


And this version i have used to install it on 1.1.17
http://www.simplemachines.org/community/index.php?topic=248871.300

for the original author,
can you make a repack/update for this mod.
I think al is fine now!
8)

sgilleland

When i try to install this via the package manager, it says it is not compatible with 1.1.7.  Is this true?  If so, will it ever be?  Thanks!

the.basement

sgilleland look up.
edit a line in extra for you.
8)

sgilleland

I am getting this error...should I continue?  How do I fix it?

3.     Execute Modification     ./Sources/ModSettings.php     Test failed

Propaganistas

Quote from: sgilleland on December 05, 2008, 02:03:24 PM
I am getting this error...should I continue?  How do I fix it?

3.     Execute Modification     ./Sources/ModSettings.php     Test failed
You shouldn't continue then.
Instead, follow the manual instructions you can find through the submit button under the downloadable file.

MrMusic

#371
Ok, I got the Mod installed and I setup some fields for my form.
However, Now, I have no idea what to do to get the form on the board I want.
Can anyone help this poor newbie?

I have 1.1.7
I am using Movies07 theme design by Bloc

I have a locked, sticky post explaining how the form is to be used for my visitors. Now, I just need to get the form working on that board. I have the ID setup but not sure what else to do. I followed instructions from a post on this forum.

Oh, when explaining...explain as if to a child...lol

Thanks in advance for any help.

Ashley
www.mrlivemusic.com

EDIT:
QuoteAnother issue: When I choose to make the field required. It has the * on the form, and when you input anything, it clear the fields out and makes the * red and says fields required when I have data put into the fields.

I am having this same issue as well. My version and theme is listed above.
And, I still have no idea if this is posting anywhere or is not because of the issue just mentioned. Thanks for any help!

jayman2

#372
I just installed this great mod on my smf 2.0 test site.  I can create a form just fine, but when I go to the input form and enter text into the field and go to the forum to check it, I just see the variable. 

For exampe, if I use this, Name :: {name} and then go to the form and enter some text, when I go to the page, that's all I get.  It's not capturing and displaying the input.  I there a list of variables that I'm supposed to be using, or am I just creating the input field wrong?

MrMusic

#373
Ok, I got the link and form working. However, when you get to the form and fill it out and hit submit, it still gives the error that the areas "required" turn red and indicate it needs to be filled out.
It was already filled out, but now they show the red asterisk and is now blank after hitting submit. Please help as I need this working soon!

Thank you for your help.
version 1.1.7
theme movie07
forum can be found at www.mrlivemusic.com/Forum [nofollow], at the "Looking for Big Band Charts" board.



Garou

There's a small bug that is causing the the required fields error the link below explains how to fix it.

http://www.simplemachines.org/community/index.php?topic=248871.msg1810128#msg1810128

MrMusic

QuoteThere's a small bug that is causing the the required fields error the link below explains how to fix it.

http://www.simplemachines.org/community/index.php?topic=248871.msg1810128#msg1810128

I went to the CustomForm.php in my CFM folder and applied the change in the link you provided.

It did NOT fix the problem. Any other suggestions?

Thank You!

Nvb

Quote from: MrMusic on December 12, 2008, 10:54:25 PM
QuoteThere's a small bug that is causing the the required fields error the link below explains how to fix it.

http://www.simplemachines.org/community/index.php?topic=248871.msg1810128#msg1810128

I went to the CustomForm.php in my CFM folder and applied the change in the link you provided.

It did NOT fix the problem. Any other suggestions?

Thank You!

I had the same problem, but this fixed it for me.
All you have to do is place the 0 between tags -> '0'
Works fine!

Nvb

I have 2 new questions:

1.) Can you give a example of the Custom Template Function in the Custom Form Settings?
    What does this function do? What needs to filled in there?

2.) Is there a way to let a Selection Box behave different on the results of a previous Selection Box?
    I'll give an example:

In Selection Box A you can choose between lets say: 
- America,Europe,Asia

Now Selection Box B needs to read the result of Selection A and display the correct subsection.
So 3 possible answers are possible:

In case of answer America, Selection Box B1 needs to display: North, Center, South
In case of answer Europa, Selection Box B2 needs to display: Netherlands,Belgium,France, England,Germany,...
In case of answer Asia, Selection Box B3 needs to display: Northern Asia,Central Asia,Eastern Asia,Southeastern Asia,...

En so on in case of a 3e selection box...

I guess it's something like IF {A} THEN display {B1 or B2 or B3}

Can this be scripted in the Custom Form Mod Settings dialog?
Help plz




Garou

The custom form template is just a basic idea of what you need to change the look of the template, IE if you want to have text or something before or after the questions. I created another example in the link below as well as a beginners form explaining how to use the different fields.

http://www.simplemachines.org/community/index.php?topic=248871.msg1805119#msg1805119

As for the selection box behavior... What your looking for doesn't exist in this mod. I suppose something could be created but I'm not sure how to go about it. Personally I would just use a text box and have the member enter the information by hand.

MrMusic

#379
Quote from: NeQo on December 13, 2008, 04:52:07 AM
Quote from: MrMusic on December 12, 2008, 10:54:25 PM
QuoteThere's a small bug that is causing the the required fields error the link below explains how to fix it.

http://www.simplemachines.org/community/index.php?topic=248871.msg1810128#msg1810128

I went to the CustomForm.php in my CFM folder and applied the change in the link you provided.

It did NOT fix the problem. Any other suggestions?

Thank You!

I had the same problem, but this fixed it for me.
All you have to do is place the 0 between tags -> '0'
Works fine!

Ok, I have tried what you stated as well. it is the same fix as in the link provided to me in this quote.

PLEASE. Can someone help me with this fix? I really have no idea what to do next.

I will attach my CustomForm.php in hopes someone may find the issue.
Thank you so much for any help you may be able to offer.

Again, my version: 1.1.7 with Movie07 theme
To view my issue, go to www.mrlivemusic.com/Forum [nofollow]
user test
pass test

Board is: Looking for Big Band Charts => here you will find the form link

Ashley

Advertisement: