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 02-15-2009 02:29 PM

Quote:

Originally Posted by CPOWA (Post 1744898)
Hi bananalive,

I was trying to edit my first form this morning at I got a runtime error. I'm not sure if I did something wrong or I found a bug. Here's what I did:

Brought the form up (using an admin ID):
1. Edited line 4 of my form. T'was a good edit.
2. Edited line 3 of my form. When I clicked Submit I got the following error:

Runtime Error: Line 308
Error: ‘vB_Editor.’ Is null of not an object

I ran debug on the script. The code is below. Line 308 is the last line.

Code:

        Edit Question

</strong></td> </tr> </table> </td> <td class="alt2" nowrap="nowrap"> <div class="smallfont"> <strong>Welcome, <a href="members/fcradvocate/">FCRAdvocate</a>.</strong><br /><strong>No <a rel="nofollow" href="search.php?do=getnew">Unread Posts</a></strong> since your last visit.<strong></strong><br />
                You last visited: 02-15-2009 at <span class="time">07:32 AM</span> <div> <script language="Javascript" type="text/javascript">
                        var cyb_pm_phrase = '<a href="pm/">Private Messages</a>: Unread 0, Total 20.';
                        var cyb_pm_phrase_stripped = cyb_pm_phrase.replace('</a>:', '</a>:<span id="navbar_cybppenh">');
                        with (document) {
                                write (cyb_pm_phrase_stripped);
                        }
                        vbmenu_register("navbar_cybppenh");
                </script> </span> <div class="vbmenu_popup" id="navbar_cybppenh_menu" style="display:none;"> <table cellpadding="4" cellspacing="1" border="0"> <tr> <td class="thead">Private Messages</td> </tr> <tr> <td class="vbmenu_option"><a href="http://www.usfcralliance.org/forums/private.php?folderid=0" accesskey="4" rel="nofollow">Inbox</a></td> </tr> <tr> <td class="vbmenu_option"><a href="http://www.usfcralliance.org/forums/private.php?folderid=-1" accesskey="4" rel="nofollow">Sent Items</a></td> </tr> <tr> <td class="vbmenu_option"><a href="http://www.usfcralliance.org/forums/pm/new/" accesskey="4" rel="nofollow">Send New Message</a></td> </tr> <tr> <td class="vbmenu_option"><a href="http://www.usfcralliance.org/forums/pm/track/" accesskey="4" rel="nofollow">Track Messages</a></td> </tr> <tr> <td class="vbmenu_option"><a href="http://www.usfcralliance.org/forums/pm/folders/" accesskey="4" rel="nofollow">Edit Folders</a></td> </tr> </table> </div></div> </div> </td> </tr> </table>  <div class="tborder" style="padding:1px; border-top-width:0px"> <table cellpadding="0" cellspacing="0" border="0" width="100%" align="center"> <tr align="center"> <td class="vbmenu_control"><a href="myaccount/">User CP</a></td> <td class="vbmenu_control"><a id="vbbloglinks" href="blogs/">Blogs</a><script type="text/javascript">vbmenu_register("vbbloglinks");</script></td>  <td class="vbmenu_control"><a id="community" href="/forums/misc.php?do=editq&amp;id=3&amp;nojs=1#community" rel="nofollow" accesskey="6">Community</a> <script type="text/javascript"> vbmenu_register("community"); </script></td> <td class="vbmenu_control"><a href="calendar/">Calendar</a></td> <td class="vbmenu_control"><a rel="nofollow" href="search.php?do=getnew" accesskey="2">New Posts</a></td> <td class="vbmenu_control"><a id="navbar_search" href="search.php" accesskey="4" rel="nofollow">Search</a> <script type="text/javascript"> vbmenu_register("navbar_search"); </script></td> <td class="vbmenu_control"><a rel="nofollow" id="usercptools" href="/forums/misc.php?do=editq&amp;id=3&amp;nojs=1#usercptools" accesskey="3">Quick Links</a> <script type="text/javascript"> vbmenu_register("usercptools"); </script></td>    </tr> </table> </div>  <br />  <div class="vbmenu_popup" id="community_menu" style="display:none;margin-top:3px" align="left"> <table cellpadding="4" cellspacing="1" border="0"> <tr><td class="thead">Community Links</td></tr> <tr><td class="vbmenu_option"><a href="groups/">Social Groups</a></td></tr> <tr><td class="vbmenu_option"><a href="album.php">Pictures &amp; Albums </a></td></tr> <tr><td class="vbmenu_option"><a href="profile/friends/">Contacts &amp; Friends</a></td></tr> <tr><td class="vbmenu_option"><a href="members/list/">Members List</a></td></tr> </table> </div>  <div class="vbmenu_popup" id="navbar_search_menu" style="display:none;margin-top:3px" align="left"> <table cellpadding="4" cellspacing="1" border="0"> <tr> <td class="thead">Search Forums</td> </tr> <tr> <td class="vbmenu_option" title="nohilite"> <form action="search.php?do=process" method="post"> <input type="hidden" name="do" value="process" /> <input type="hidden" name="quicksearch" value="1" /> <input type="hidden" name="childforums" value="1" /> <input type="hidden" name="exactname" value="1" /> <input type="hidden" name="s" value="" /> <input type="hidden" name="securitytoken" value="1234713557-e24a2ed5d54d37995e4d2f94c7819f9ad20982bc" /> <div><input type="text" class="bginput" name="query" size="25" tabindex="1001" /><input type="submit" class="button" value="Go" tabindex="1004" /></div> <div style="margin-top:6px"> <label for="rb_nb_sp0"><input type="radio" name="showposts" value="0" id="rb_nb_sp0" tabindex="1002" checked="checked" />Show Threads</label>
                                                &nbsp;
                                                <label for="rb_nb_sp1"><input type="radio" name="showposts" value="1" id="rb_nb_sp1" tabindex="1003" />Show Posts</label> </div> </form> </td> </tr> <tr> <td class="vbmenu_option"><a href="tags/" rel="nofollow">Tag Search</a></td> </tr> <tr> <td class="vbmenu_option"><a href="search.php" accesskey="4" rel="nofollow">Advanced Search</a></td> </tr> <tr> <td class="vbmenu_option"><a rel="nofollow" href="post_thanks.php?do=findallthanks">Find All Thanked Posts</a></td> </tr><tr> <td class="thead">Search Blogs</td> </tr> <tr> <td class="vbmenu_option" title="nohilite"> <form action="blog_search.php?do=dosearch" method="post"> <input type="hidden" name="s" value="" /> <input type="hidden" name="securitytoken" value="1234713557-e24a2ed5d54d37995e4d2f94c7819f9ad20982bc" /> <input type="hidden" name="do" value="dosearch" /> <input type="hidden" name="quicksearch" value="1" /> <div><input type="text" class="bginput" name="text" size="25" tabindex="2003" /><input type="submit" class="button" value="Go" tabindex="2004" /></div> </form> </td> </tr> <tr> <td class="vbmenu_option"><a href="blog_tag.php" rel="nofollow">Tag Search</a></td> </tr> <tr> <td class="vbmenu_option"><a rel="nofollow" href="blog_search.php?do=search">Advanced Search</a></td> </tr> </table> </div>  <div class="vbmenu_popup" id="usercptools_menu" style="display:none;margin-top:3px" align="left"> <table cellpadding="4" cellspacing="1" border="0"> <tr><td class="thead">Quick Links</td></tr> <tr><td class="vbmenu_option"><a href="search.php?do=getdaily">Today's Posts</a></td></tr> <tr><td class="vbmenu_option"><a rel="nofollow" href="forumdisplay.php?do=markread">Mark Forums Read</a></td></tr> <tr><td class="vbmenu_option"><a href="#" onclick="window.open('misc.php?do=buddylist&amp;focus=1','buddylist','statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes,width=250,height=300'); return false;">Open Contacts Popup</a></td></tr> <tr><td class="thead"><a href="myaccount/">User Control Panel</a></td></tr> <tr><td class="vbmenu_option"><a href="profile/signature/">Edit Signature</a></td></tr>  <tr><td class="vbmenu_option"><a href="profile/edit/">Edit Your Details</a></td></tr> <tr><td class="vbmenu_option"><a href="profile/options/">Edit Options</a></td></tr> <tr><td class="thead">Miscellaneous</td></tr><tr><td class="vbmenu_option"><a rel="nofollow" href="http://www.usfcralliance.org/forums/misc.php?do=cybaregman">Advanced Registration Management</a></td></tr><tr><td class="vbmenu_option"><a rel="nofollow" href="misc.php?do=cybmodstats">Moderating Stats</a></td></tr><tr><td class="vbmenu_option"><a rel="nofollow" href="misc.php?do=donlist">View Donations</a></td></tr> <tr><td class="vbmenu_option"><a href="pm/" rel="nofollow">Private Messages</a></td></tr> <tr><td class="vbmenu_option"><a href="subscription.php" rel="nofollow">Subscribed Threads</a></td></tr> <tr><td class="vbmenu_option"><a href="members/fcradvocate/">Your Profile</a></td></tr> <tr><td class="vbmenu_option"><a href="activeusers/">Who's Online</a></td></tr> <tr><td class="vbmenu_option"><a rel="nofollow" href="http://www.usfcralliance.org/forums/misc.php?do=forms">Forms</a></td></tr> </table> </div>    <div class="vbmenu_popup" id="pagenav_menu" style="display:none"> <table cellpadding="4" cellspacing="1" border="0"> <tr> <td class="thead" nowrap="nowrap">Go to Page...</td> </tr> <tr> <td class="vbmenu_option" title="nohilite"> <form action="http://www.usfcralliance.org/forums/" method="get" onsubmit="return this.gotopage()" id="pagenav_form"> <input type="text" class="bginput" id="pagenav_itxt" style="font-size:11px" size="4" /> <input type="button" class="button" id="pagenav_ibtn" value="Go" /> </form> </td> </tr> </table> </div>  <form action="" method="post" enctype="multipart/form-data" name="vbform"  onsubmit="return vB_Editor[''].prepare_submit(this.question.value, 5)"> <input type="hidden" name="do" value="updateq" /> <input type="hidden" name="s" value="" /> <input type="hidden" name="fid" value="1" /> <input type="hidden" name="id" value="3" /> <input type="hidden" name="type" value="5" /> <input type="hidden" name="securitytoken" value="1234713557-e24a2ed5d54d37995e4d2f94c7819f9ad20982bc" /> <table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center"> <tr> <td class="tcat"> Edit Question</td> </tr> <tr> <td class="thead">Dropdown Select</td> </tr> <tr> <td class="panelsurround" align="center"><div class="panel"> <div style="width:640px" align="left"> <table cellpadding="0" cellspacing="0" border="0" class="fieldset"> <tr> <td class="smallfont">Question:</td> </tr> <tr> <td><input name="question" type="text" id="question" class="bginput" size="40" maxlength="255" value="What state do you live in?" /> </td> </tr> </table> <table cellpadding="0" cellspacing="0" border="0" class="fieldset"> <tr> <td class="smallfont">Description:</td> </tr> <tr> <td><textarea name="description" id="description" class="bginput" rows="2" cols="60">Please select the state you live in from the dropdown list.</textarea> <div class="smallfont"><a href="#"  onclick="return resize_textarea(1, 'description')">Increase Size</a> <a href="#"  onclick="return resize_textarea(-1, 'description')">Decrease Size</a></div> </td> </tr> </table> <table cellpadding="0" cellspacing="0" border="0" class="fieldset"> <tr> <td class="smallfont">Display Order:</td> </tr> <tr> <td><input name="displayorder" type="text" id="displayorder" class="bginput" size="40" maxlength="3" value="20" /> </td> </tr> </table> <table cellpadding="0" cellspacing="0" border="0" class="fieldset"> <tr> <td class="smallfont">Options: <br /> <i>Enter the options that the user can choose from. Separate each option with a new-line (carriage return).</i></td> </tr> <tr> <td><textarea name="options" id="options" class="bginput" rows="10" cols="60">Alabama

As I mentioned, I'm not sure if I'm using it right or not but, it seems pretty striaght forward.

Regards,
Nita

What are you editing? the plugins?

CPOWA 02-15-2009 02:38 PM

1 Attachment(s)
Quote:

Originally Posted by bananalive (Post 1744901)
What are you editing? the plugins?

No. From FORUMHOME/Quick Links/Forms/form name/Edit Form

Changed Description field and checked the "This is a compulsory question" box. Clicked Submit and got the runtime error. I just did it again to make sure the steps above are correct and I got the same error. I didn't go into debug this time and the changes are reflected in the form now. It's still catching the error though.

I doubt if this will help but, here's a link to the form that my user would see: FORM

bananalive 02-15-2009 03:57 PM

Quote:

Originally Posted by CPOWA (Post 1744910)
No. From FORUMHOME/Quick Links/Forms/form name/Edit Form

Changed Description field and checked the "This is a compulsory question" box. Clicked Submit and got the runtime error. I just did it again to make sure the steps above are correct and I got the same error. I didn't go into debug this time and the changes are reflected in the form now. It's still catching the error though.

I doubt if this will help but, here's a link to the form that my user would see: FORM

Find and delete in template form_editq
HTML Code:

<if condition="!is_browser('webtv')"> onsubmit="return vB_Editor['$editorid'].prepare_submit(this.question.value, 5)"</if>

CPOWA 02-15-2009 04:21 PM

Quote:

Originally Posted by bananalive (Post 1744985)
Find and delete in template form_editq
HTML Code:

<if condition="!is_browser('webtv')"> onsubmit="return vB_Editor['$editorid'].prepare_submit(this.question.value, 5)"</if>

Deleted per instruction. Works perfect!

Thanks bananalive, this is the best mod I have. I can't vote for MOTM though because I already voted.

Also changed form_editq in my style and it's working fine as well. :)

Regards,
Nita

Heldenverband 02-16-2009 07:08 AM

I missed the clock field :(

We need this to create a date / time for meeting ( example ).

s810car 02-16-2009 07:09 AM

maybe i totally missed it, but I'm trying to incorporate the prefixids to assign to new threads, I can't figure out how to set this when creating the new thread. Is it just something I can add to the process/submit hook, or am I missing something totally?

AWESOME work on this btw, It has allowed me to do some special applications I've been scratching my head about for almost a year:D Nominated for sure!

xlguy 02-16-2009 02:02 PM

How do I pass a hidden variable to the form before it's submitted? Thanks :)

Like if I want to pass the referring URL from where the form link is clicked?

bananalive 02-16-2009 02:11 PM

Quote:

Originally Posted by xlguy (Post 1745919)
How do I pass a hidden variable to the form before it's submitted? Thanks :)

Use Form Hook: Before Submit

bananalive 02-16-2009 02:12 PM

Quote:

Originally Posted by s810car (Post 1745683)
maybe i totally missed it, but I'm trying to incorporate the prefixids to assign to new threads, I can't figure out how to set this when creating the new thread. Is it just something I can add to the process/submit hook, or am I missing something totally?

AWESOME work on this btw, It has allowed me to do some special applications I've been scratching my head about for almost a year:D Nominated for sure!

Find in plugin: Easy Forms Part 1
PHP Code:

$newpost['title'] =& $threadtitle

Add Below:
PHP Code:

$newpost['prefixid'] =& ''

You'll need to specify the prefixid in the single quotes

xlguy 02-16-2009 02:16 PM

Quote:

Originally Posted by bananalive (Post 1745926)
Use Form Hook: Before Submit

Thanks, I should have been more specific. What I'd like is this:

misc.php?do=form&fid=1&refurl=http://www.something.com/page.php?p=1

How can I pass the refurl value through the form (behind the scenes) and output the other end?

Thanks in advance, this would be ideal :)


All times are GMT. The time now is 08:45 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.03674 seconds
  • Memory Usage 1,815KB
  • 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
  • (2)bbcode_html_printable
  • (2)bbcode_php_printable
  • (7)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