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)

midnz 05-18-2011 11:01 PM

Quote:

Originally Posted by bananalive (Post 2196512)
Perhaps add checkboxes to


AdminCP -> VBulletin Options -> Easy Form Options -> Question Types to Hide in Form Results Table

Although this will affect all your forms

Thanks :). I have added checkboxes so that they're hidden in Form Results Tables.

I wondered if it was possible to have checkbox answers converted to unique numbers and then have all of those unique numbers totaled?

Example:
Question: What colours.....?
Checkbox Answers: 1.Blue 2.Green 4.Yellow 8.White 16.Pink 32.Red 64.Black 128.Purple 256.etc etc etc (the numbers would need to be invisible)

Somebody selecting Yellow, Black and Blue would cause the answer in the Form Results Table to be 69
That would make it easy to know which checkboxes were selected because only 4 + 1 + 64 = 69

Jurg 05-19-2011 04:26 AM

Quote:

Originally Posted by Jurg (Post 2193240)
Please can someone tell me how I could phrase a form hook for the following:

I intend to have 22 identical drop-down fields with 22 answers. I need to validate this before submission to ensure that each answer is selected only once. I.E. each answer will be selected once. Apologies but my PHP knowledge is not good, any help would be appreciated.

Anyone?

whitey92lx 05-19-2011 04:53 PM

awesome!

helwoe 05-24-2011 03:22 AM

Is there a way to tweak this code to make multi-select list?

Code:

$answer .= '<select name="'.$formbit[id].'">';
$answer .= '<option></option>';
$thisanswer = $q_{$formbit[id]};
$members = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "user
WHERE membergroupids LIKE \"%17%\"
ORDER BY username ASC");
    while($row = $db->fetch_array($members)) {
$answer .= '<option value="'.$row[username].'"';
if ($row[username] == $thisanswer) {
$answer .= 'selected="selected"';
}
$answer .= '>'.$row[username].'</option>';
}
$answer .= '</select>';


Kapeket 05-24-2011 04:08 AM

How about a way to have a specific form open from the nav button directly?

Not the list per say.

Thanks!

Tahooma 05-24-2011 05:40 PM

Thank you for your reply bananalive!

Quote:

Yes, select the Form Action as 'Create a New Thread', and then there will be an option to allow attachments
For us it is very important that the data are not visible for other users.
Is there any other way to upload the pics whereby no new threat will be be opend and so the date are not visible vor any other persons?

Regards
Harald

clubvr4 05-25-2011 10:35 AM

Hi,

I'm having some problems with prefix.

I am using the following code in my custom question "choose prefix"

PHP Code:

require_once(DIR '/includes/functions_prefix.php'); 
$thisanswer $q[$formbit[id]]; 
if (!
$form['forumid'])
{
$form['forumid'] = xx;
}
$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>'

Where XX is the destination forum of the form.

under form actions i have selected "no prefix", when i go to my form, i can see the dropdown with all the prefix for the destination forum, but when i submit - no prefix is attached the the thread.

There are no custom hooks etc for this form.

Please advise.

clubvr4 05-25-2011 10:45 AM

I've also tried using the following code, to no avail.

PHP Code:

require_once(DIR '/includes/functions_prefix.php');  
$thisanswer $q[$formbit[id]];  
$forumid $form['forumid'] = XX
$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>'

However,

using the above code, and the no attachments code you kindly provided me before - I find that when i click on attachments i do not have permissions to access to FUM..

PHP Code:

$currentattaches $db->query_first("SELECT COUNT(*) AS countrows FROM " TABLE_PREFIX "attachment WHERE posthash = '" $db->escape_string($posthash) . "' AND userid = " $vbulletin->userinfo['userid'] );
$attachcount $currentattaches['countrows'];
if (!
$attachcount)
{
$complete false;
$customerror .= '<div class="blockrow"><div>Error, No attachments!</div></div>';


Removing either the no attachment code or the prefix select code allows me to once again open FUM.

Evertonized 05-25-2011 10:47 AM

When I submit the form it says thanks for submitting and looks like it's worked. However the results show no one has submitted a form.

What could be the problem?

clubvr4 05-25-2011 11:53 AM

Quote:

Originally Posted by clubvr4 (Post 2111983)
Or, is there a widget out yet for using Forms with CMS?

Is there any method of CMS being used to display the forms?


All times are GMT. The time now is 04:05 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.02768 seconds
  • Memory Usage 1,764KB
  • 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
  • (1)bbcode_code_printable
  • (3)bbcode_php_printable
  • (4)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