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)

zushiba 03-07-2011 03:16 PM

The BBCode format of forms with section headers is a little mucked up.

Sample:
Quote:

Annual Report Form.
Year
2011
Annual Report Title
69
Unit
22
Program Mission Statement.
23
Section 1: Program SummaryProgram Summary
25
Section II: Annual UpdateAnnual Update
27
Section III: Implications of Course-Program Alignment MatrixImplications of Course-Program Alignment Matrix
29
Section IV: Responses to student Achievement Outcome and Other1: Course Enrollment Trends
31
2: Course Success Rates
32
3: English, ESL, and Math Improvement Rates.
33
4: Declared Majors
34
5: Degrees and Certificates Earned
35
6: Other Data (Accuplacer, Student Evaluation of Course, etc.)
36
Section V: Summary of Major Findings.Summary of Major Findings.
38
Section VI: RecommendationsRecommendations
40
Section VII: Evaluation of Program Review and Unit Planning ProcessEvaluation of Program Review and Unit Planning Process
42
Evaluation of Program Review and Unit Planning Process
43
Screenshot of formatted BBCode

There is no break between section and the question immediately following the section. I've bolded the questions above in the example.

Faskis 03-08-2011 06:18 AM

Curious, is there any possibility we could see the mod functional with the new official vB Mobile style?

bananalive 03-09-2011 02:14 PM

Quote:

Originally Posted by GrandTheftGamer (Post 2170819)
Curious, is there any possibility we could see the mod functional with the new official vB Mobile style?

Maybe, in the future, I haven't looked at the mobile style yet. Have you tried using it with the mobile style? I assume the form results wouldn't display very well in mobile style because they are very wide tables, but perhaps viewing & submitting the form would be fine.

bananalive 03-09-2011 02:21 PM

1 Attachment(s)
Quote:

Originally Posted by zushiba (Post 2170579)
The BBCode format of forms with section headers is a little mucked up.

Sample:

Screenshot of formatted BBCode

There is no break between section and the question immediately following the section. I've bolded the questions above in the example.

Edit Form: Add \r\n to end of the section bb code

https://vborg.vbsupport.ru/attachmen...1&d=1299687672

zushiba 03-09-2011 02:26 PM

Sweet, that did the trick. Thanks bananalive you are 10 times over The Man™

bananalive 03-09-2011 02:27 PM

Quote:

Originally Posted by ascroft (Post 2169978)
OK - thanks - progress here. :)

1. I have changed the plugin to launch the form from forums 53 & 65. Thanks.

2. The PHP code now shows the full forum list in the form if I don't filter - but doesn't show anything in the drop down if I restrict this. For example only including 53,65 in the array?

3. The thread prefix which is also working off a drop down doesn't show anything in the list either until I submit, then it says its missing, and then the drop down is populated. I can then select and submit - as long as the filter isn't on as per 2.

The form hook before submit presently shows:

$form['prefixid'] = $qo['prefix'];
$forumid = $form['forumid'] = $qo['forumid'];

The first row I already had for the prefix, and then added the second row now. Maybe they should be reversed?

btw the PHP in the custom question for the prefix is:

require_once(DIR . '/includes/functions_prefix.php');
$thisanswer = $q[$formbit[id]];
$prefix_options = fetch_prefix_html($form['forumid'], $thisanswer, true);
$answer = '<select name="' . $formbit[id] . '" id="q_' . $formbit[id] . '" class="bginput">';
$answer .= '<option value="">'.$vbphrase[no_prefix_meta].'</option>';
$answer .= $prefix_options;
$answer .= '</select>';


Finally, my initial test posted the thread in to the forum I launched the form (and is the default forum in the form body) from even though I selected another forum from the drop down list. I may have to do more testing re this point once a couple more of the other things are clarified.

Many thanks for your help.

Put the forum question first, then the plugin question second.

And then change the php of the plugin to:

PHP Code:

require_once(DIR '/includes/functions_prefix.php'); 
$thisanswer $q[$formbit[id]]; 
$prefix_options fetch_prefix_html($q['forumid'], $thisanswertrue); 
$answer '<select name="' $formbit[id] . '" id="q_' $formbit[id] . '" class="bginput">'
$answer .= '<option value="">'.$vbphrase[no_prefix_meta].'</option>'
$answer .= $prefix_options
$answer .= '</select>'

But the person will have to click submit or preview after selecting/changing their forum, unless you have a default forumid to fetch prefixes from, so then the code above should be

PHP Code:

require_once(DIR '/includes/functions_prefix.php'); 
$thisanswer $q[$formbit[id]]; 
if (!
$form['forumid'])
{
$form['forumid'] = 53;
}
$prefix_options fetch_prefix_html($form['forumid'], $thisanswertrue); 
$answer '<select name="' $formbit[id] . '" id="q_' $formbit[id] . '" class="bginput">'
$answer .= '<option value="">'.$vbphrase[no_prefix_meta].'</option>'
$answer .= $prefix_options
$answer .= '</select>'


ascroft 03-11-2011 06:23 AM

Thank you - this is all good. Nearly there.

My one remaining issue is to do with the drop down list of the forums in the custom question (now #1 with prefix #2 question and yes I do have a default forum to get the prefixes from) and filtering using an array. I am using:

$answer = "<select name=\"$formbit[id]\" id=\"q_" . $formbit[id] . "\">";
foreach ($vbulletin->forumcache AS $forumid => $forum)
{
if (!in_array($qo['forumid'], array(53,9999,34,55,65)))
{
continue;
}
if ($qo['forumid']==$forumid)
{
$forum['selected'] = ' selected="selected"';
}
$answer .= "<option value=\"$forumid\"$forum[selected]>$forum[title]</option>";
}
$answer .= "</select>";

However I still don't get any values displayed - the drop down list is empty - would you mind please checking the syntax for this? (I am launching the form from forum 53 by the way)

Finally - one unrelated question - is it possible to display the prefix in the custom form output - I don't see a variable name for it and wondered.

Many thanks for your help.



Quote:

Originally Posted by bananalive (Post 2171419)
Put the forum question first, then the plugin question second.

And then change the php of the plugin to:

PHP Code:

require_once(DIR '/includes/functions_prefix.php'); 
$thisanswer $q[$formbit[id]]; 
$prefix_options fetch_prefix_html($q['forumid'], $thisanswertrue); 
$answer '<select name="' $formbit[id] . '" id="q_' $formbit[id] . '" class="bginput">'
$answer .= '<option value="">'.$vbphrase[no_prefix_meta].'</option>'
$answer .= $prefix_options
$answer .= '</select>'

But the person will have to click submit or preview after selecting/changing their forum, unless you have a default forumid to fetch prefixes from, so then the code above should be

PHP Code:

require_once(DIR '/includes/functions_prefix.php'); 
$thisanswer $q[$formbit[id]]; 
if (!
$form['forumid'])
{
$form['forumid'] = 53;
}
$prefix_options fetch_prefix_html($form['forumid'], $thisanswertrue); 
$answer '<select name="' $formbit[id] . '" id="q_' $formbit[id] . '" class="bginput">'
$answer .= '<option value="">'.$vbphrase[no_prefix_meta].'</option>'
$answer .= $prefix_options
$answer .= '</select>'



Internetcafe 03-12-2011 02:02 PM

Great addition to the forum .. thanks.

Question which I hope someone can with :-
Creating a form as a Vendors agreement.
1/ Your Company Name .. Single line text field
2/ Vendors Agreement .. Custom
3/ Comments .. Multi-line text field
4/ Agree to agreement .. yes/no question

When form is submitted, everything but the agreement is submitted but the only place I could place the agreement is in the 'custom' description box. I need that agreement submitted with the form !?

Thanks

markb5900 03-12-2011 03:23 PM

1 Attachment(s)
I have several categories with several forms in each category.

I would like to have them display across the screen in columns instead of full screen width for each one.
Can someone point me in the right direction?

See attached for what I have right now.

Thank you

bananalive 03-12-2011 06:58 PM

Quote:

Originally Posted by markb5900 (Post 2172564)
I have several categories with several forms in each category.

I would like to have them display across the screen in columns instead of full screen width for each one.
Can someone point me in the right direction?

See attached for what I have right now.

Thank you

You'll need to edit template form_list_top and/or form_list_cat.


All times are GMT. The time now is 03:36 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.02753 seconds
  • Memory Usage 1,783KB
  • 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
  • (4)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (5)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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