vb.org Archive

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

bananalive 01-27-2009 03:06 PM

Quote:

Originally Posted by Stryker412 (Post 1726230)
Is there an easier way to do birthdays? In my current form I have three drop down boxes for day/month/year?

Same with locations for State and Country.

You could use custom question to get birthday of user from their profile.

PHP Code:

$answer '<input type="text" readonly="readonly" id="q_' $formbit[id] . '" name="' $formbit[id] . '" value="' $vbulletin->userinfo[birthday] . '" />'

Can't think of any easy way of easy way to do all states/ countries. But for US/Canada you could use this custom question with following php code:
PHP Code:

$answer '<select id="q_' $formbit[id] . '" name="' $formbit[id] . '"><option value="">Select One</option><optgroup label="Canadian Provinces"><option value="AB">Alberta</option><option value="BC">British Columbia</option><option value="MB">Manitoba</option><option value="NB">New Brunswick</option><option value="NF">Newfoundland</option><option value="NT">Northwest Territories</option><option value="NS">Nova Scotia</option><option value="NU">Nunavut</option><option value="ON">Ontario</option><option value="PE">Prince Edward Island</option><option value="QC">Quebec</option><option value="SK">Saskatchewan</option><option value="YT">Yukon Territory</option></optgroup>        <optgroup label="U.S. States"><option value="AK">Alaska</option><option value="AL">Alabama</option><option value="AR">Arkansas</option><option value="AZ">Arizona</option><option value="CA">California</option><option value="CO">Colorado</option><option value="CT">Connecticut</option><option value="DC">District of Columbia</option><option value="DE">Delaware</option><option value="FL">Florida</option><option value="GA">Georgia</option><option value="HI">Hawaii</option><option value="IA">Iowa</option><option value="ID">Idaho</option><option value="IL">Illinois</option><option value="IN">Indiana</option><option value="KS">Kansas</option><option value="KY">Kentucky</option><option value="LA">Louisiana</option><option value="MA">Massachusetts</option><option value="MD">Maryland</option><option value="ME">Maine</option><option value="MI">Michigan</option><option value="MN">Minnesota</option><option value="MO">Missouri</option><option value="MS">Mississippi</option><option value="MT">Montana</option><option value="NC">North Carolina</option><option value="ND">North Dakota</option><option value="NE">Nebraska</option><option value="NH">New Hampshire</option><option value="NJ">New Jersey</option><option value="NM">New Mexico</option><option value="NV">Nevada</option><option value="NY">New York</option><option value="OH">Ohio</option><option value="OK">Oklahoma</option><option value="OR">Oregon</option><option value="PA">Pennsylvania</option><option value="PR">Puerto Rico</option><option value="RI">Rhode Island</option><option value="SC">South Carolina</option><option value="SD">South Dakota</option><option value="TN">Tennessee</option><option value="TX">Texas</option><option value="UT">Utah</option><option value="VA">Virginia</option><option value="VT">Vermont</option><option value="WA">Washington</option><option value="WI">Wisconsin</option><option value="WV">West Virginia</option><option value="WY">Wyoming</option></optgroup></select>';
$selected "value=\"" $q_{$formbit[id]} . "\"";
$answer str_replace($selected$selected"selected=\"seleceted\""$answer); 


Phoenixgal 01-27-2009 04:09 PM

OK is there a way that it can be EMAILED WITH the attachement option?

bananalive 01-27-2009 04:11 PM

Quote:

Originally Posted by Phoenixgal (Post 1726284)
OK is there a way that it can be EMAILED WITH the attachement option?

Not at the moment.

Stryker412 01-27-2009 04:27 PM

Quote:

Originally Posted by bananalive (Post 1726249)
You could use custom question to get birthday of user from their profile.

PHP Code:

$answer '<input type="text" readonly="readonly" id="q_' $formbit[id] . '" name="' $formbit[id] . '" value="' $vbulletin->userinfo[birthday] . '" />'

Can't think of any easy way of easy way to do all states/ countries. But for US/Canada you could use this custom question with following php code:
PHP Code:

$answer '<select id="q_' $formbit[id] . '" name="' $formbit[id] . '"><option value="">Select One</option><optgroup label="Canadian Provinces"><option value="AB">Alberta</option><option value="BC">British Columbia</option><option value="MB">Manitoba</option><option value="NB">New Brunswick</option><option value="NF">Newfoundland</option><option value="NT">Northwest Territories</option><option value="NS">Nova Scotia</option><option value="NU">Nunavut</option><option value="ON">Ontario</option><option value="PE">Prince Edward Island</option><option value="QC">Quebec</option><option value="SK">Saskatchewan</option><option value="YT">Yukon Territory</option></optgroup>        <optgroup label="U.S. States"><option value="AK">Alaska</option><option value="AL">Alabama</option><option value="AR">Arkansas</option><option value="AZ">Arizona</option><option value="CA">California</option><option value="CO">Colorado</option><option value="CT">Connecticut</option><option value="DC">District of Columbia</option><option value="DE">Delaware</option><option value="FL">Florida</option><option value="GA">Georgia</option><option value="HI">Hawaii</option><option value="IA">Iowa</option><option value="ID">Idaho</option><option value="IL">Illinois</option><option value="IN">Indiana</option><option value="KS">Kansas</option><option value="KY">Kentucky</option><option value="LA">Louisiana</option><option value="MA">Massachusetts</option><option value="MD">Maryland</option><option value="ME">Maine</option><option value="MI">Michigan</option><option value="MN">Minnesota</option><option value="MO">Missouri</option><option value="MS">Mississippi</option><option value="MT">Montana</option><option value="NC">North Carolina</option><option value="ND">North Dakota</option><option value="NE">Nebraska</option><option value="NH">New Hampshire</option><option value="NJ">New Jersey</option><option value="NM">New Mexico</option><option value="NV">Nevada</option><option value="NY">New York</option><option value="OH">Ohio</option><option value="OK">Oklahoma</option><option value="OR">Oregon</option><option value="PA">Pennsylvania</option><option value="PR">Puerto Rico</option><option value="RI">Rhode Island</option><option value="SC">South Carolina</option><option value="SD">South Dakota</option><option value="TN">Tennessee</option><option value="TX">Texas</option><option value="UT">Utah</option><option value="VA">Virginia</option><option value="VT">Vermont</option><option value="WA">Washington</option><option value="WI">Wisconsin</option><option value="WV">West Virginia</option><option value="WY">Wyoming</option></optgroup></select>';
$selected "value=\"" $q_{$formbit[id]} . "\"";
$answer str_replace($selected$selected"selected=\"seleceted\""$answer); 


Thanks for that information. I tested my first form and very impressed with the results. One question, how can I change the font color of the large heading within the completed form?

Does this form need the user to have permission to post within the section it's intended to go? For instance, I post my completed forms in an area where admins can discuss the applicant. However, with my current form app I have to give a regular user permission to post in the section but I did not give them permission to view the forum. It worked well until I found out that if a user has the option to subscribe to any thread they post in, they can view it.


Lastly, what is the PHP code to have their forum username automatically entered for a question?

Haltech 01-27-2009 08:04 PM

Awesome to see this come so far, rather quickly!!

Question, is there a way to embed a hyperlink into a question? With a form i created for vendors, i wanted to place the link to paid subscriptions in the question with a yes/no answer.

Thanks!

Simon Lloyd 01-27-2009 08:38 PM

Quote:

Originally Posted by Haltech (Post 1726463)
Awesome to see this come so far, rather quickly!!

Question, is there a way to embed a hyperlink into a question? With a form i created for vendors, i wanted to place the link to paid subscriptions in the question with a yes/no answer.

Thanks!

I believe you can use BBCode

Trek 01-28-2009 02:16 AM

Would it be possible to include something so you can have a calendar in the form? Clicking the calendar will then add the date/time to another text field?

Also, then when saving the form, if there's data in the calendar field, have it create a calendar event on a specific calendar?

Basically what I'm doing is creating an event calendar form, having it write to a forum, then locking that forum down to new posts, but allowing people to reply to events.

Then I want to use the RSVP hack on this forum only. Which should pretty much give me a fairly accurate event calendar.

If possible, when someone then edits the event, if it matches an entry in the forum, to update the forum post as well. This might be way too much to ask from this mod, but I thought I'd ask anyway. =)

Trek 01-28-2009 02:55 AM

Found a small bug.

When using the image verification option, it displays the verification correctly, but then displays the frame for the verification again under the correctly displayed verification..

I'm using ReCaptcha if that matters/helps any.

valletin 01-28-2009 03:24 AM

Quote:

Originally Posted by bananalive (Post 1726178)
Put the php code in the form hook before submit, bu you'll need to replace $q_{4} with the correct question number or if it's a combination of answers use $threadtitle.


Create forum for this.

Set forum permissions of clients to not view other threads.

Set forum permissions of clients to able to edit their own posts/ threads.

Then clients can create thread within the forum using the form (or the usual way)

But where can i assign for each User where the form will be posted into into their thread? The same form has to go into different threads depending on the User.. Can i set a default threadID for each user where forms will go? Thanks for your reply in advance.

bananalive 01-28-2009 12:42 PM

1 Attachment(s)
Quote:

Originally Posted by valletin (Post 1726808)
But where can i assign for each User where the form will be posted into into their thread? The same form has to go into different threads depending on the User.. Can i set a default threadID for each user where forms will go? Thanks for your reply in advance.

Import attached file:

use following php code in the form hook: before submit
PHP Code:

$threadtitle $vbulletin->input->clean($threadtitleTYPE_STR);
$check $vbulletin->db->query_first("SELECT * FROM " TABLE_PREFIX "thread WHERE title='".addslashes($threadtitle)."' ORDER BY threadid DESC");
if (isset(
$check[threadid]))
{
$form[action] = 3;
$form[where] = $check[threadid];




All times are GMT. The time now is 11:58 PM.

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.02218 seconds
  • Memory Usage 1,806KB
  • 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
  • (5)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
  • (4)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