Easily create forms with no HTML or PHP knowledge. Questions can be made compulsory and are checked before the form is submitted. Forms can be previewed. (You can create multiple forms)
I'm having issues with all posts (from non admin/mods) from the forms being put in the moderation queue.
I searched this thread and checked
PHP Code:
$newpost['visible'] = '1';
The people posting always had permission to post in these forums but are now being redirected to the forms as directed in this post
Any ideas?
I am still having the same issue as well and I already changed it to 1. I am also still having an error when I click preview as well. Anyone have any ideas on how to fix these 2 issues?
I did exactly that and I get
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting T_NEW or T_STRING or T_VARIABLE or '$' in /home/topnotch/public_html/forums/misc.php(100) : eval()'d code on line 438
It takes me to a page with all of my smilies.
Are you replacing 1 with the appropriate prefixid?
Here's another question for you.
I'm sure there's an easy way to do this, but I don't understand php. I'm strictly a copy and paste guy.
Questions that depend on another question.
Question 4 [your item for sale] is not compulsory - but...
Question 5 [how many of item one?]
relates to question 4 and must be filled in, if 4 is used
Question 6 {your price for item?]
relates to question 4 and must be filled in, if 4 is used
________________
if question 4 if filled in then both questions 5 and 6 must be filled in as well. If question 4 is left blank, then 5 and 6 must be left blank as well.
I hope I've explained it well enough.
Thank you for your help. So far I really like this Mod and can see a lot of uses for it.
php for hook before form submit
PHP Code:
if ($q[4] && (empty($q[5]) || empty($q[6])))
{
$complete = false;
if (empty($q[5])) $iqs[] = 5;
if (empty($q[6])) $iqs[] = 6;
}
if ($q[4] && (empty($q[5]) || empty($q[6]))) { $complete = false; if (empty($q[5])) $iqs[] = 5; if (empty($q[6])) $iqs[] = 6; }
Thank you again bananalive, it worked exactly as I asked. You Da Man!
However, I didn't think it through all the way.
What I really needed was if 'any' of the three question were used, then the other two would have to be filled in too.
So I just repeated the code and changed the q#'s around like this
Code:
if ($q[4] && (empty($q[5]) || empty($q[6])))
{
$complete = false;
if (empty($q[5])) $iqs[] = 5;
if (empty($q[6])) $iqs[] = 6;
}
if ($q[5] && (empty($q[4]) || empty($q[6])))
{
$complete = false;
if (empty($q[4])) $iqs[] = 4;
if (empty($q[6])) $iqs[] = 6;
}
if ($q[6] && (empty($q[4]) || empty($q[5])))
{
$complete = false;
if (empty($q[4])) $iqs[] = 4;
if (empty($q[5])) $iqs[] = 5;
}
and it works ok.
But I'm wondering if this is the proper way to do it for each set of questions, or if it should be written a different way.
Thanks again for your help. *nominated for Mod of Month*
Everything works great except that if I change to a custom layout and questions I have that have a drop down box or check box will no longer display the correct answer.
Example - Is this a trade or sale (dropdown is Trade,Sale)
In the custom output I Put 'This is a: {q_2}
With the the answer will be 'This is a : Array'
It replaces the correct answer with 'Array'
If I dont change the custom output it shows the correct answer...is there something else I need to do?
Also with a custom layout none of the BBCode applies - everything is normal text
UPDATE - with a drop down box no information is put into the output - checkbox shows ARRAY
Everything works great except that if I change to a custom layout and questions I have that have a drop down box or check box will no longer display the correct answer.
Example - Is this a trade or sale (dropdown is Trade,Sale)
In the custom output I Put 'This is a: {q_2}
With the the answer will be 'This is a : Array'
It replaces the correct answer with 'Array'
If I dont change the custom output it shows the correct answer...is there something else I need to do?
Also with a custom layout none of the BBCode applies - everything is normal text
UPDATE - with a drop down box no information is put into the output - checkbox shows ARRAY
Thank you again bananalive, it worked exactly as I asked. You Da Man!
However, I didn't think it through all the way.
What I really needed was if 'any' of the three question were used, then the other two would have to be filled in too.
So I just repeated the code and changed the q#'s around like this
and it works ok.
But I'm wondering if this is the proper way to do it for each set of questions, or if it should be written a different way.
Thanks again for your help. *nominated for Mod of Month*
PHP Code:
if ($q[4] || $q[5] || $q[6])
{
if (empty($q[5]))
{
$iqs[] = 5;
$complete = false;
}
if (empty($q[6]))
{
$iqs[] = 6;
$complete = false;
}
if (empty($q[4]))
{
$iqs[] = 4;
$complete = false;
}
}