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)

admin0 03-07-2009 02:23 AM

Hi,

If there is say form1 and user have already submitted to it, is it possible to pull off the old values or if the user submits again, just update the new values rather than insert new lines in the database ?

bananalive 03-07-2009 10:02 AM

1 Attachment(s)
Quote:

Originally Posted by dknelson (Post 1760559)
Well, I thank you very much for the guidance but I can't get this:
https://vborg.vbsupport.ru/showthrea...201097&page=39

to work. When I press submit, I just get a blank message where the "Click here to go to thread" would normally appear.

I'm sure I'm doing something wrong. I'm actually not sure to select, if anything, where you would normally select to submit to thread, email, forumID, etc. I tried selecting nothing and also selecting "Submit to Thread" but leaving the threadID blank. Neither worked.

I would like to say that this is a FANTASTIC mod and is as well supported as any mod I've ever seen here.

I'm sending a donation now because this is worth it regardless of whether or not this issue is figured out.

Make sure you are using the right question hash: see attachment

I've checked it works: http://www.bananalive.co.cc/misc.php?do=form&fid=13

bananalive 03-07-2009 10:03 AM

Quote:

Originally Posted by admin0 (Post 1762202)
Hi,

If there is say form1 and user have already submitted to it, is it possible to pull off the old values or if the user submits again, just update the new values rather than insert new lines in the database ?

I don't think so.

bananalive 03-07-2009 10:04 AM

Quote:

Originally Posted by xcesivvs (Post 1761545)
sorry to be a pain mate... i asked this a bit back and still stuck... thanks

ok, i'll test this, and try to make it easier.

bananalive 03-07-2009 10:04 AM

Quote:

Originally Posted by frogster (Post 1760516)
Okay so that worked for the initial post .... don't kill me... but now anytime the same user posts anything else instead of adding a new note to the facebook wall, it replaces the old post with the new post. I would normally ask the FB developer/thread for help but the thing is that it just started happening when I installed the new xml file. Sorry for the trouble and I really do appreciate your help.

Is this for all posts, or just ones created with Easy Forms?

dknelson 03-07-2009 10:22 AM

OK....I will try the restaurant form again. I thought I was using the correct question hash. I tried yours and it worked fine so what are you selecting where it asks how the forum is to be submitted. Submit to thread? If so, since the script is choosing the thread ID, what are you just leaving it blank?

bananalive 03-07-2009 11:29 AM

Quote:

Originally Posted by dknelson (Post 1762371)
OK....I will try the restaurant form again. I thought I was using the correct question hash. I tried yours and it worked fine so what are you selecting where it asks how the forum is to be submitted. Submit to thread? If so, since the script is choosing the thread ID, what are you just leaving it blank?

Here's a screenshot which shows all the settings:
http://img9.imageshack.us/img9/2391/editform.png

dknelson 03-07-2009 12:01 PM

OK.....thanks. I understand my problem now. Here is the php for my custom "location" question. As you can see, there are no question hashes. So I need to add question hashes to all of these answers. Do I just assign them manually?

Quote:

$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);

bananalive 03-07-2009 12:21 PM

Quote:

Originally Posted by dknelson (Post 1762437)
OK.....thanks. I understand my problem now. Here is the php for my custom "location" question. As you can see, there are no question hashes. So I need to add question hashes to all of these answers. Do I just assign them manually?

No question hashs are to identify a question's output. Your custom question should be this:

For usa restaurant reviews form
PHP Code:

$answer '<select name="'.$formbit[id].'">';
$answer .= '<option></option>';
$thisanswer $q[$formbit[id]];
$threads $db->query_read("SELECT * FROM " TABLE_PREFIX "thread
WHERE forumid = '111' 
ORDER BY title ASC"
);
    while(
$row $db->fetch_array($threads)) {
$answer .= '<option value="'.$row[threadid].'"';
if (
$row[threadid] == $thisanswer) {
$answer .= ' selected="selected"';
}
$answer .= '>'.htmlspecialchars($row[title]).'</option>';
}
$answer .= '</select>'


dknelson 03-07-2009 01:12 PM

WOW...I am so close now. Or I should say that YOU are so close to explaining it to a complete dummy. I replaced my drop down state selection question for the USA forum with that code. It works. The only thing now is that here is what I get posted.

Quote:

Name of Restaurant: test
Street Address: test
City: test
Location 32653
Website (Optional): -
Quality of Food: Bad
Quality of Service: Bad
Biker Friendly? Yes
Kind of Food? (Mexican, Chinese, etc.) tetst
Alcohol Served? Yes
Additional Comments: -
As you can see, it is posting the threadID for location instead of the actual state. I am not using custom output. Is the only way to correct this to use custom output with $qo


All times are GMT. The time now is 05:31 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.03553 seconds
  • Memory Usage 1,766KB
  • 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_php_printable
  • (8)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