TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Alpaca - Easy Forms for jQuery

49 pointsby bikeshackover 11 years ago

16 comments

gbergerover 11 years ago
Why does the form have to be generated dynamically by JS?<p>A much better solution would be to generate the markup on the server-side. It should be easy enough to port this to Node, and a bit more of work for other major backend languages like Ruby, Python and PHP.<p>It could even be implemented as a webapp that takes the input JSON on the left side, and spits out HTML on the right, which I could paste into my site markup directly.<p>Right now, the trade-off is too big for the developer-time convenience of generating forms dynamically.
评论 #6824747 未加载
评论 #6826596 未加载
jmdukeover 11 years ago
At a first glance: very cool plugin, I think the core idea of representing forms as JSON is a good one. Two gentle criticisms:<p>1. From a &#x27;prospective developer&#x27; standpoint, I&#x27;m worried about the dependencies and general heft of the thing. Does it require jQuery UI? Is there a stripped-down version I can use? As far as I can tell, the landing page doesn&#x27;t answer these questions.<p>2. More broadly, I&#x27;d argue that there are two types of &lt;form&gt; implementations: barebones forms that use &#x27;value&#x27; and &#x27;type&#x27; and very little else, and hyper-customized ones that are generated bespoke. This plugin seems to address the middle of that spectrum: people who need a little -- but not too much -- customization. It&#x27;s hard to tell exactly what options I&#x27;m given just from poking through the first few pages.
ivanhoeover 11 years ago
Cool idea, but please fix the radio button labels. Having to click on a radio button directly makes for a really bad UX
janekkover 11 years ago
I&#x27;m worried this does not put usability first. In the example Edit form, I noticed two problems: 1) the radio button labels have not been linked using &#x27;for&#x27; to the buttons, so clicking on them does nothing. 2) Hovering my mouse over the first address line text box causes it to move down away from my mouse! Errors like these will cause a lot of entry mistakes.
franksmuleover 11 years ago
The radio buttons label not being linked is a deal breaker for me
weegoover 11 years ago
This is really just an awful idea. Every few weeks&#x2F;months I see some kind of &quot;wouldn&#x27;t it be great to have users write pseudo-html in json and we can then write loads of javascript to write the html for them!&quot; kind of library and the answer to that is always &quot;why would that have ever seemed like a good idea?&quot;.<p>Good libraries decorate html to provide functionality because, well html is pretty good at the html bit.
tmikaeldover 11 years ago
Two things:<p>1. Too heavy.<p>2. Doesn&#x27;t degrade nicely.
aplummerover 11 years ago
Before having a big complain about the radio buttons, why not see:<p><a href="https://github.com/1337/alpaca/commit/d15032dd14214786f695252dddf4ddee499faadf" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;1337&#x2F;alpaca&#x2F;commit&#x2F;d15032dd14214786f69525...</a><p>It literally would have taken a similar amount of time to fix vs complain :&#x2F;, and much less to just open the issues list.
nnqover 11 years ago
The first example renders a form with radio button labels not tied to the appropriate controls, so I can&#x27;t just click them to select the radio button. Same for the other labels. This is <i>totally unforgivable</i> and such a well known annoyance that I refuse to read anything else. RIP Alpaca.
zerorbitover 11 years ago
Love it! The complaints here are usually from people who assume this is good for all situations. If you have a fixed amount of static forms, this wouldn&#x27;t make sense. BUT, if you had to do dynamic forms that can change drastically with user input, this is wonderful.
Vbitsover 11 years ago
During my University coursework this year I had the same idea during one of my assignments, I wrote something similar without using jQuery as a hack for a entry level web development paper.
yannisover 11 years ago
Why is the maximum age for a field set at 50?
hartatorover 11 years ago
Why you can only click on the bullet to select something on the example form? They seem pretty bad... at forms.
评论 #6825123 未加载
pbreitover 11 years ago
The delay is a concern. There would need to be some significant benefit for me to enforce that on users.
tzamanover 11 years ago
After working with Angular, it pretty much became my only choice for javascript + form combination
icecreampainover 11 years ago
No labels at all just on the demo form. This isn&#x27;t 1996 where one can make shitty HTML forms for shits and giggles. People expect high quality forms with labels nowadays.<p>As others have said: dealbreaker. Not going to use it.