Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
How to use the htmlfield
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Paul Dorman  
View profile  
 More options Apr 14 2011, 2:18 am
From: Paul Dorman <paul.dor...@gmail.com>
Date: Wed, 13 Apr 2011 23:18:23 -0700 (PDT)
Local: Thurs, Apr 14 2011 2:18 am
Subject: How to use the htmlfield
Hi all,

I'd like to use a ReCaptcha element on my form, which I assumed could
be accomplished using the htmlfield. I have the following in
my :fields declaration:

(forms/htmlfield :be-human (captcha/create-html))

And I get a Ring Stacktrace like this:

core.clj:1245           clojure.core/name
core.clj:106            sandbar.core/property-lookup
forms.clj:81            sandbar.forms/field-label
forms.clj:110           sandbar.forms/htmlfield
RestFn.java:446         clojure.lang.RestFn.invoke
authenticate.clj:73     dev.html.authenticate/eval3213[fn]
MultiFn.java:163                clojure.lang.MultiFn.invoke
authenticate.clj:73     dev.html.authenticate/view-204
authenticate.clj:72     dev.html.authenticate/authenticate-form[fn]
forms.clj:612           sandbar.forms/form-routes[fn]
..
..

I presume this is my mistake :)

Thanks in advance for any help. Also, feel free to tell me if I should
be using something newer than Sandbar 0.3.0.

Regards,
Paul


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brenton  
View profile  
 More options Apr 14 2011, 4:41 pm
From: Brenton <bashw...@gmail.com>
Date: Thu, 14 Apr 2011 13:41:08 -0700 (PDT)
Local: Thurs, Apr 14 2011 4:41 pm
Subject: Re: How to use the htmlfield
It doesn't look like you are doing anything wrong.

I tried to recreate the problem on my end and couldn't.

If you look at the source for htmlfield it should not be calling field-
label in this situation.

https://github.com/brentonashworth/sandbar/blob/0.3.0/src/sandbar/for...

Also, be warned that htmlfield is only for displaying information like
text or images within a form. The text box for entering the captcha
should be another field.

If you can't resolve the problem then open an issue on GitHub and make
sure to include some code that I can use to re-create the problem.

Thanks and good luck,
Brenton

On Apr 13, 11:18 pm, Paul Dorman <paul.dor...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Paul Dorman  
View profile  
 More options Apr 14 2011, 8:14 pm
From: Paul Dorman <paul.dor...@gmail.com>
Date: Fri, 15 Apr 2011 12:14:40 +1200
Local: Thurs, Apr 14 2011 8:14 pm
Subject: Re: How to use the htmlfield

Thanks Brenton,

yes, having the ReCaptcha present in the form is my first challenge. It did
occur to me that I might have to specify a custom field type (though I hope
I don't have to), and in the back of my mind I was hoping that you or
someone else familiar with Sandbar's internals would fill in the "Show how
to create custom form fields" TODO item on the Forms wiki page ;).

The ReCaptcha library creates a JavaScript snippet like:

 "<script type=\"text/javascript\" src=\"
http://api.recaptcha.net/challenge?k=xyxyxyxyxyxyxxyxyxyxyxyxyxyxyxyx...
.\"></script>\r\n"

And this in turn produces a table containing a recaptcha_response_field text
field. So presumably I will be able to handle this along with the rest of
the form data when submitted.

Cheers,
Paul


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »