Recent Topics

1 Feb 22, 2011 00:22    

My b2evolution Version: Not Entered

Ok, so I'm still a a bit unclear here. In v4, we can no longer just copy the code from the "Blog Owner Contact Form" and drop it into a post because of the "Missing Crumb" problem. This can be resolved by removing this line from the form code:

<input name="redirect_to" type="hidden" value="/index.php/Contact/?blog=6&amp;disp=msgform" />

and replacing the message_send.php file in the htsrv folder withe the v3 version but I've been told this can create other problems. Really? What other problems? If the ONLY place a form is being submitted is through a post using the pasted form code, then are there really negative ramifications to going back to the v3 message_send.php file? That's what I'm doing here: http://www.bluehorsegallery.com/index.php/Contact/ and it seems to be working. Is there a better solution to this problem?[/code]

2 Feb 22, 2011 00:39

why are you so stuck with that default contact form anyway ? just use a manually created form ?

btw afai remember, sam2kb tells it has been fixed in cvs. have you at least tried the cvs head?

3 Feb 22, 2011 01:05

I haven't tried the CVS yet - do you think I should just install that on my next build and roll with it? I'm just a little concerned that I'll have a pre-production release running a client's site.

As for the manually created form - I asked this a while back but I'm wondering if you know of an easy way to bang out a form so I don't have to code the whole thing?

4 Feb 22, 2011 01:11

firstly you dont have to use cvs on a production server. just install a fresh instance of b2 with the latest cvs and play as you wish to see how it plays out.

as for manually creating forms;

you can use sites like: phpform.org to quickly sketch html forms if you are not familiar with them.

as for the php part, instead of manually typing in each input, you can simply use a software to do that for you, by importing that html form you just created. such as -php form wizard-.

5 Feb 22, 2011 01:39

Thanks for the great info - I'm looking into the phpform.org and php form wizard now. I'm REALLY a beginner with this stuff. I guess I just want to keep things as simple as possible. I'm getting hung up on what, specifically the problem with this form is:

<form class="bComment" method="post" action="http://fairjustice.net/htsrv/message_send.php"> 
<div><span style="float:right"></span> 
<script type="text/javascript"> 
							var nb_dynamicSelects = 0;
							var tab_dynamicSelects = Array();
						</script>	
		<fieldset> 
			<div class="label"><label>To:</label></div> 
			<div class="info"><strong>admin</strong></div> 
		</fieldset> 
	
		<fieldset id="ffield_d" > 
<div class="label"><label for="d">From:</label></div> 
<div class="input"><input maxlength="50" class="bComment form_text_input" value="admin" size="40" type="text" name="d" id="d" /> 
 <span class="notes">Your name.</span></div> 
</fieldset> 
 
<fieldset id="ffield_f" > 
<div class="label"><label for="f">Email:</label></div> 
<div class="input"><input maxlength="100" class="bComment form_text_input" value="info@fairjustice.net" size="40" type="text" name="f" id="f" /> 
 <span class="notes">Your email address. (Will <strong>not</strong> be displayed on this site.)</span></div> 
</fieldset> 
 
<fieldset id="ffield_g" > 
<div class="label"><label for="g">Subject:</label></div> 
<div class="input"><input maxlength="255" class="bComment form_text_input" value="" size="40" type="text" name="g" id="g" /> 
 <span class="notes">Subject of email message.</span></div> 
</fieldset> 
 
<fieldset id="ffield_h" > 
<div class="label"><label for="h">Message:</label></div> 
<div class="input"><img src="http://fairjustice.net/rsc/img/blank.gif" width="1" height="1" alt="" /><textarea cols="40" class="bComment form_textarea_input" name="h" id="h" rows="15"></textarea><img src="http://fairjustice.net/rsc/img/blank.gif" width="1" height="1" alt="" /><br/><span class="notes">Plain text only.</span></div> 
</fieldset> 
 
<fieldset  class=" fieldset" id=""> 
 
			<div class="input"> 
							<input name="submit_message_1" class="submit" value="Send message" type="submit" /> 
			</div> 
			</fieldset> 
	
		<div class="clear"></div> 
	
	</div><div class="inline"><input name="crumb_newmessage" type="hidden" value="pcjk1Rsccirc3AGkl8P484pKcSgTJnLn" /> 
<input name="blog" type="hidden" value="7" /> 
<input name="recipient_id" type="hidden" value="1" /> 
<input name="post_id" type="hidden" /> 
<input name="comment_id" type="hidden" /> 
<input name="redirect_to" type="hidden" value="/index.php/Contact/?blog=7" /> 
</div> 
</form>

I understand most of it but I don't understand the "crumb..." line or why the "redirect" line needs to be removed (but I don't really care - I'll just remove it). I'm really just looking to make this form "generic" so I can copy it from site to site, change a few values, and call it good (without having to go back to the v3 message_send.php file) or completely rebuilding the same form from scratch. This was working fine until v4 - I would just copy the code from the "Blog Owner Contact Form" and drop it into a post. Is there a way I can continue to do this and just change a few values to fix issues w/ the way v4 works?

...and yes, I realize this has become "Forms for COMPLETE dummies" at this point - perhaps we should change the subject to that! :D

6 Feb 22, 2011 10:47

what b2 actually needs is a form creator plugin.

It shouldnt be hard to create one, no promises made, but i might be able to make one at the weekend.

7 Feb 22, 2011 20:36

Now THAT would be AWESOME!

8 Feb 22, 2011 21:45

CVS version doesn't fix any form related problems
...well simply because there are no problems :)

You need to remove the "redirect" field so after you submit a form you get redirected to the previous page.

9 Feb 22, 2011 21:52

building an ajax form creator is easy maybe even a drag and drop one.but i wouldnt know how to store the created form in the db.i ll look for clues in other similar plugins of other softwares and see what i can do.

10 Apr 02, 2011 02:45

Hey tilqicom, were you ever able to figure this out? I'm still copying the message_send.php file from 3.3.3 to make this work...probably not the best solution... Just wondering if you got anywhere with this...

11 Apr 27, 2011 20:07

Is this something that can be added to the feature set of a future release? B2 could really use a quick, custom form builder! I just got a PM from someone needing the same thing... seems like I'm not the only one who would find this TREMENDOUSLY useful...

12 Apr 29, 2011 18:27

Ethan5150 wrote:

Is this something that can be added to the feature set of a future release? B2 could really use a quick, custom form builder! I just got a PM from someone needing the same thing... seems like I'm not the only one who would find this TREMENDOUSLY useful...

yes that is very important right now.. because every business owner knows a contact form is a major PLUS! and I just cant seam to get it working myself. Not sure why. I am hoping for v4.06 or v.4.1 pretty soon.

13 Feb 26, 2013 02:10

Hey, I'm wondering if this was ever addressed. I'm currently working in 4.1.6 and back to the "wanting to slightly customize the form" problem. It would sure be nice if we could, for example, embed the standard form INSIDE a post. Is there still no easy way to do this?

14 Feb 27, 2013 02:23

I am putting the suggestion to be able to embed a contact form into a post on the todo list.

15 Feb 27, 2013 02:39

Awesome! Thanks for taking it into consideration. I sure appreciate all that you've done Francois! You're an amazing guy!


Form is loading...