vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   New Posting Features - Easy Forms v4.x - Create a form or multiple forms without php or html knowledge (https://vborg.vbsupport.ru/showthread.php?t=234385)

lickalotapus 06-18-2010 01:12 AM

Quote:

Originally Posted by Dragonsys (Post 2055146)
The Custom Form Output box is on the Edit Form page.
You can use BBCode in that field to format the output.
There is some info right below the box. As for the questions & answers, there are drop downs right above the box, which will insert them for you.

The insert of my questions and answers doesn't work. If I click and drag them all I get is 'javascript://'.

I think the solution is probably there, maybe I'm missing something.

Thanks

Dragonsys 06-18-2010 01:59 AM

Quote:

Originally Posted by lickalotapus (Post 2055224)
The insert of my questions and answers doesn't work. If I click and drag them all I get is 'javascript://'.

I think the solution is probably there, maybe I'm missing something.

Thanks

you might have a javascript problem with your browser. you can do this though

The Question Name = {qn_xx}
Question Answer = {qo_xx}
where xx is the Question Number
So to get what you posted above you would something like this in the Custom Box

PHP Code:

[b]{qn_1}[/b]: {qo_1}
[
b]{qn_2}[/b]: {qo_2}
[
b]{qn_3}[/b]: {qo_3


lickalotapus 06-18-2010 02:59 AM

That worked prefectly!

Another question:

I want to increase the size of the answer box, I want to make it larger in both width and height. If I change the size it just makes the field longer. I'd like it to be about 5 inches square.

Thanks in advance,

Dragonsys 06-18-2010 01:11 PM

Quote:

Originally Posted by lickalotapus (Post 2055243)
That worked prefectly!

Another question:

I want to increase the size of the answer box, I want to make it larger in both width and height. If I change the size it just makes the field longer. I'd like it to be about 5 inches square.

Thanks in advance,

Use a Multi-Line Text Field for the question, and just edit the sizes for:
Textarea Rows:
Textarea Columns:

Rows is the height and Columns is the length of the box displayed on the form.

lickalotapus 06-18-2010 03:28 PM

That did the trick.

For some reason when several of the functions aren't working. It seems the javascripts aren't working. Any ideas?

Thanks in advance

Dragonsys 06-18-2010 03:37 PM

Quote:

Originally Posted by lickalotapus (Post 2055480)
That did the trick.

For some reason when several of the functions aren't working. It seems the javascripts aren't working. Any ideas?

Thanks in advance

not really, maybe you have a javascript on your forums which is conflicting? It works fine on my sites.

lickalotapus 06-18-2010 03:47 PM

Thanks, now I just need to figure out where the conflicts are

You've been very helpful and I appreciate it!

lickalotapus 06-19-2010 12:50 AM

Never figured out the conflicts but I did find a work around.

How can I change the navbar name? Right now it's called 'forms'

Thanks in advance,

Welshy2008 06-19-2010 09:08 AM

Quote:

Originally Posted by lickalotapus (Post 2055641)
How can I change the navbar name? Right now it's called 'forms'

Thanks in advance,


ACP -> Languages & Phrases -> Phrase Manager -> look for 'downloads2', click edit, and re-name it.

dannykilla 06-19-2010 02:41 PM

I am using the this for my thread title which works fine:

{q_1} {q_3} {q_2} - Application

But it doesnt work for the poll question, all I actually see is this {q_1} {q_3} {q_2} - Application rather than the actually correct information.

Is this a bug?

lickalotapus 06-19-2010 05:08 PM

Quote:

Originally Posted by Welshy2008 (Post 2055749)
ACP -> Languages & Phrases -> Phrase Manager -> look for 'downloads2', click edit, and re-name it.

I couldn't find 'downloads2' but since I knew where to look I was able to figure it out. It was in the Easy Forms > Phrase section.

Thanks for pointing me in right direction!

bananalive 06-19-2010 07:11 PM

1 Attachment(s)
Quote:

Originally Posted by dannykilla (Post 2055862)
I am using the this for my thread title which works fine:

{q_1} {q_3} {q_2} - Application

But it doesnt work for the poll question, all I actually see is this {q_1} {q_3} {q_2} - Application rather than the actually correct information.

Is this a bug?

It was not a feature in previous versions, but I've added it in attached file. (will be included in next version)

bananalive 06-19-2010 07:13 PM

Quote:

Originally Posted by lickalotapus (Post 2055480)
That did the trick.

For some reason when several of the functions aren't working. It seems the javascripts aren't working. Any ideas?

Thanks in advance

Have you uploaded the javascript file (easyforms.js) to \clientscript\

dannykilla 06-19-2010 07:14 PM

Quote:

Originally Posted by bananalive (Post 2055996)
It was not a feature in previous versions, but I've added it in attached file. (will be included in next version)

Awesome thanks m8!

bananalive 06-19-2010 07:20 PM

Quote:

Originally Posted by lickalotapus (Post 2055224)
The insert of my questions and answers doesn't work. If I click and drag them all I get is 'javascript://'.

I think the solution is probably there, maybe I'm missing something.

Thanks

What browser are you using?

If it still doesn't work then use the question hashes.

e.g. for question hash 1 :
for question use {qn_1}
for answer use {qo_1}

bananalive 06-19-2010 07:21 PM

Quote:

Originally Posted by Mimirswell (Post 2055149)
Form Hook: Before Submit:
PHP Code:

if ($qo[737] == "1")
{
$form[forumid] = 14;
}
elseif (
$qo[737] == "2")
{
$form[forumid] = 23;
}  
elseif (
$qo[737] == "3")
{
$form[forumid] = 31;
}  
elseif (
$qo[737] == "4")
{
$form[forumid] = 39;


This hook no longer works after the migration to 4.0. The forumid is still the same.

Check that the question hash of the forumid question is 737

bananalive 06-19-2010 07:24 PM

Quote:

Originally Posted by lickalotapus (Post 2055120)
How can I change the script so the answers are on the same line as the question?

I want it to look like:

Name: Mr. Smith
Date: 6-17-10
Services Needed: Cleaning and Repairs
Amount Charged: $50
Amount Paid: $60
Feedback: Everything went well
Referred By: www.abc.com
Would you Recommend Us?: Yes

Any suggestions?

Edit Form

Under Form BB code and Custom Output find Answer BB code:

remove[indent] from each box

Alisa Lindsay 06-19-2010 09:14 PM

Hello everyone.

I use Easy Forms at both my sites and if I neglected to say it before, let me say now, what a wonderful mod!

Was wondering, however, is there a way to require the answer to one of the questions be an image?

Thanks and Warmest Regards,

Alisa

Alisa Lindsay 06-19-2010 09:18 PM

Quote:

Originally Posted by jdj (Post 2034449)
I'm also interested in using this to create a character's bio/profile and I'm also learning to use it. One thing though...because I'm not a developer, to me the acronym RPG stands for "rocket propelled grenade". So if in the course of my own explorations I find something that might help you I may not know because I do not understand the jargon. :D

JJ

:D Oh dear! So sorry to take so long.

RPG in my world = Roleplaying Game.

I did fix the issue with horizontal rules, btw.

Regards,

Alisa

ssslippy 06-21-2010 02:20 AM

Hey banana I saw your code https://vborg.vbsupport.ru/showpost....&postcount=146

Is it possible to modify this to put them into the queue for a join able usergroup?

bananalive 06-21-2010 01:46 PM

Quote:

Originally Posted by Alisa Lindsay (Post 2056053)
Hello everyone.

I use Easy Forms at both my sites and if I neglected to say it before, let me say now, what a wonderful mod!

Was wondering, however, is there a way to require the answer to one of the questions be an image?

Thanks and Warmest Regards,

Alisa

Form Hook: Before Submit:
PHP Code:

if (empty($postattach))
{
    
$currentattaches $db->query_read("
    SELECT dateline, filename, attachmentid
    FROM " 
TABLE_PREFIX "attachment
    WHERE posthash = '" 
$db->escape_string($posthash) . "'
    AND userid = " 
$vbulletin->userinfo['userid']
    );

    while (
$attach $db->fetch_array($currentattaches))
    {
        
$postattach["$attach[attachmentid]"] = $attach;
        
$attachcount++;
        
$formoutput str_replace('[attach]'.$attachcount.'[/attach]','[attach]'.$attach['attachmentid'].'[/attach]',$formoutput);
    }


Then use this in Custom Form Output:

Code:

[attach]1[/attach]

Ocean-Wonders 06-21-2010 04:21 PM

Love the mod but im getting database errors about my max_packet_size. It doesn't happen all the time but it's quite frequent.

Xencored 06-21-2010 06:21 PM

Quote:

Originally Posted by bananalive (Post 2056918)
Form Hook: Before Submit:
PHP Code:

if (empty($postattach))
{
    
$currentattaches $db->query_read("
    SELECT dateline, filename, attachmentid
    FROM " 
TABLE_PREFIX "attachment
    WHERE posthash = '" 
$db->escape_string($posthash) . "'
    AND userid = " 
$vbulletin->userinfo['userid']
    );

    while (
$attach $db->fetch_array($currentattaches))
    {
        
$postattach["$attach[attachmentid]"] = $attach;
        
$attachcount++;
        
$formoutput str_replace('[attach]'.$attachcount.'[/attach]','[attach]'.$attach['attachmentid'].'[/attach]',$formoutput);
    }


Then use this in Custom Form Output:

Code:

[attach]1[/attach]

Thank you so muchy <3

bananalive 06-21-2010 08:31 PM

Quote:

Originally Posted by Ocean-Wonders (Post 2056998)
Love the mod but im getting database errors about my max_packet_size. It doesn't happen all the time but it's quite frequent.

The only thing I can suggest is to increase your server's max_packet_size. (Or ask your host to do it.)

Mimirswell 06-21-2010 10:08 PM

Quote:

Originally Posted by bananalive (Post 2056010)
Check that the question hash of the forumid question is 737

It was but just to make sure, I recreated the question and updated to the new question hash and it still failed. I double checked the forumid as well.

I'm also having a problem where when a user hits preview, it automatically fills in all dropdown select boxes with the first selection.

Dragonsys 06-22-2010 03:41 AM

Quote:

Originally Posted by Mimirswell (Post 2057144)
I'm also having a problem where when a user hits preview, it automatically fills in all dropdown select boxes with the first selection.

yeah, it does this on my site as well.

StagKill 06-22-2010 01:40 PM

I was wondering if it is possible that, that the form which is produced can be automatically posted as a thread in a certain category?

Like introduction, applications?

Dragonsys 06-22-2010 03:14 PM

Quote:

Originally Posted by StagKill (Post 2057456)
I was wondering if it is possible that, that the form which is produced can be automatically posted as a thread in a certain category?

Like introduction, applications?

you can have the form results be added as a thread (or a reply) in which ever forum/thread you want.
That is one of the options when you create/edit the form

StagKill 06-23-2010 04:10 AM

Quote:

Originally Posted by Dragonsys (Post 2057510)
you can have the form results be added as a thread (or a reply) in which ever forum/thread you want.
That is one of the options when you create/edit the form

Thanks,

Sorry I didnt use the application and posted, I got it working the way I wanted :).

One more thing if possible in vB 4.0, when we click new thread in a particular category say introductions it should redirect to a form is that possible?
Also, when we click new post in a particular thread, lets say "All reports here", it should redirect to another form. Is that possible?

leia 06-25-2010 02:03 PM

Very awesome mod. :) Nominated!

One question that is probably very easy. I skimmed the thread but didn't see an answer.

In the custom output, what would I need to write to have certain content only appear if an optional field is completed?

i.e. User ticks boxes indicating damages on item. I want it to display: "Seller reports the following damages: (answer output)." If they don't tick any boxes, I don't want any part of the sentence. (I'm also using it for linked images, so I don't want the IMG tags to appear if they haven't pasted a URL in one of the optional fields).

Thank you again for the mod. :)

Dragonsys 06-25-2010 05:32 PM

Quote:

Originally Posted by StagKill (Post 2057892)
Thanks,

Sorry I didnt use the application and posted, I got it working the way I wanted :).

One more thing if possible in vB 4.0, when we click new thread in a particular category say introductions it should redirect to a form is that possible?
Also, when we click new post in a particular thread, lets say "All reports here", it should redirect to another form. Is that possible?

When you create a forum, you can make it be a link instead. if the user clicked on the forum they would be directed to your link
I don't know about making the New thread button do it though. maybe by using vb if statements in the template...

Dragonsys 06-25-2010 05:35 PM

Quote:

Originally Posted by leia (Post 2059393)
Very awesome mod. :) Nominated!

One question that is probably very easy. I skimmed the thread but didn't see an answer.

In the custom output, what would I need to write to have certain content only appear if an optional field is completed?

i.e. User ticks boxes indicating damages on item. I want it to display: "Seller reports the following damages: (answer output)." If they don't tick any boxes, I don't want any part of the sentence. (I'm also using it for linked images, so I don't want the IMG tags to appear if they haven't pasted a URL in one of the optional fields).

Thank you again for the mod. :)

that would probably require using the Hooks, but I'm not real sure.

Alfa1 06-25-2010 05:52 PM

Quote:

Originally Posted by bananalive (Post 1972146)
  • Custom Form Output: (optional) You can create your own layout to the thread/ pm/ post/ email the form created. Allowed: BB code, $q[1] (replace 1 with the correct question #), $qn[1], $threadtitle, $form[title], {username}, $thisuser[username] (replace username with any user field). Leave blank to use default layout.

This works well, but the output of radio buttons and checkboxes come out as a number or 'array'. What can I add to the custom form output, to correct this?

leia 06-25-2010 06:27 PM

Quote:

Originally Posted by Dragonsys (Post 2059490)
that would probably require using the Hooks, but I'm not real sure.

I was thinking something with a vb: if, like how you can make a profile field display only if it contained data... but I don't know if that can be done in the forms.

I have been trying variations of this, but nothing successful so far:
HTML Code:

<vb:if condition="$prepared['qo_5']">[B]This item has the following damages:[/B] {qo_5}
{qo_damagedetail}</vb:if>


bananalive 06-25-2010 08:13 PM

Quote:

Originally Posted by Mimirswell (Post 2057144)

I'm also having a problem where when a user hits preview, it automatically fills in all dropdown select boxes with the first selection.

That will be caused by another modification you have installed on your site.

bananalive 06-25-2010 08:24 PM

Quote:

Originally Posted by StagKill (Post 2057892)
One more thing if possible in vB 4.0, when we click new thread in a particular category say introductions it should redirect to a form is that possible?

Create vBulletin Plugin with hook location newthread_form_complete
PHP Code:

if (in_array($forumid, array(1,2,3)))

header'Location: http://www.your-site.com/forum/misc.php?do=form&fid=1' ) ; 


Quote:

Originally Posted by StagKill (Post 2057892)
Also, when we click new post in a particular thread, lets say "All reports here", it should redirect to another form. Is that possible?

Create vBulletin Plugin with hook location newreply_form_complete
PHP Code:

if (in_array($threadid, array(1,2,3)))

header'Location: http://www.your-site.com/forum/misc.php?do=form&fid=1' ) ; 



bananalive 06-25-2010 08:26 PM

Quote:

Originally Posted by leia (Post 2059393)
Very awesome mod. :) Nominated!

One question that is probably very easy. I skimmed the thread but didn't see an answer.

In the custom output, what would I need to write to have certain content only appear if an optional field is completed?

i.e. User ticks boxes indicating damages on item. I want it to display: "Seller reports the following damages: (answer output)." If they don't tick any boxes, I don't want any part of the sentence. (I'm also using it for linked images, so I don't want the IMG tags to appear if they haven't pasted a URL in one of the optional fields).

Thank you again for the mod. :)

Use custom output with vBulletin conditionals, for example

Code:

<vb:if condition="$qo['34']">[img]{qo_1}[/img]</vb:if>

bananalive 06-25-2010 08:27 PM

Quote:

Originally Posted by Alfa1 (Post 2059497)
[/LIST][/LEFT]
[/CENTER]
This works well, but the output of radio buttons and checkboxes come out as a number or 'array'. What can I add to the custom form output, to correct this?

Use {qo_1} instead of {q_1}

bananalive 06-25-2010 08:30 PM

Quote:

Originally Posted by leia (Post 2059509)
I was thinking something with a vb: if, like how you can make a profile field display only if it contained data... but I don't know if that can be done in the forms.

I have been trying variations of this, but nothing successful so far:
HTML Code:

<vb:if condition="$prepared['qo_5']">[B]This item has the following damages:[/B] {qo_5}
{qo_damagedetail}</vb:if>


Use <vb:if condition="$qo['5']"> rather than <vb:if condition="$prepared['qo_5']">

leia 06-25-2010 09:35 PM

Thanks, you're awesome. :)


All times are GMT. The time now is 09:35 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02415 seconds
  • Memory Usage 1,891KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (2)bbcode_html_printable
  • (6)bbcode_php_printable
  • (30)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete