I need to create a from in lift with username and phone number.
can someone give a full example how to create a simple form in lift that can be submitted? or a reference to a good one. all examples I have seen are not full or has too many options for me, and I couldn't manage to compile them.
Thanks,
Ohad.
You can find an excellent, simple example in the introductory course given by David Pollak in London here. The snippet for the simple form (instead of a phone number as you comment it has an age) is here. The html associated is this one, just comment the Lift Screen section and uncomment the simple form.
Please also note that Lift has a very active and willing to help community, so you can also ask these questions in the Lift mail list.
Related
I'm currently working through a geddy tutorial and came across a line of code:
<%- partial('form', {step: {}, toDos: toDos}) %>
What does partial mean? I've done a google search without much insight. I'm guessing it means that you partially load the content so the page loads faster?
Any explanations or helpful links would be appreciated.
http://geddyjs.org/tutorial
It's been a while since I've coded so if I should be looking at a particular method of coding (e.g. OOP, MVC) that I'm missing let me know.
I received this answer by Dan Craciun on experts exchange which answers it for me:
In geddy, a partial (denoted by a _ in front of the name) is a reusable file/template, that is meant to be used in more than one template. It helps share code between different templates.
See here for a longer explanation (about half page, "An intro to partials"): http://code.tutsplus.com/tutorials/creating-a-todo-list-app-with-nodejs-and-geddy--net-24535
HTH,
Dan
I am not sure, but in Symfony - partials are used in case that you have the some template, but there is a part that may be changed later (for example if you have the heading part of your html page, but the title will be different depending on what type of page it is).
So in order to keep the entire template and not break it into 2 parts, there are partials.
I need to create a poll/form with a few questions. The issue is that the possible answers are too varied to be able to predict them and put them as options (eg: "favourite fruit"), so I need it to be an open field option (as in the user can fill in his own answer). Then I need that input to be published on my blogger page/post.
eg:
Favourite color:
Blue
Favourite fruit:
Apple
Is there anyway to do that? I dont know which way to start looking, if in the direction of polls, questionnaires or forms.
Any piece of advice would be much appreciated.
Thank you
Sorry, Blogger doesn't provide any option to directly allow users to publish answers from polls into blog post.
You may use free online form generator websites ( Google Docs Forms , emailmeform and other form generating tools) to get the poll result in your email.
And manually add the data to your blog post.
I was filling out a form on uSell.com to ship out an old phone and when I entered my address, a dialog box popped up telling me what I entered along with their suggestion of what to change it to. I thought this was cool and was wondering how I can replicate that in my forms.
Looks like you talking about some kind of auto-completer. This can be done in various ways, depending on the languages you are using. You can make a simple auto-completer using just html, javascript and css. More complicated auto-completers can make server side calls to search through a database etc.
Have a look at the link below, they explain a very simple auto-completer.
Related topic
Hope this helps, good luck :)
I dont want to waste lots of time on creating wrong functions
Plan:
It's already done, but to understand better.. I tell you :) So first thing I made: I added extra articles which are shown in main article. So it's looks like this: main article and extra nine articles in which i want to add voting.
Eeach article(extra articles, not main article) must have rating like in youtube - like and dislike. I think of using this script ( so the first question is - how to create this voting and add to these articles ? Should i create this voting plugin or component ? Or i already can add code to article view and model ? Each article will have different articles in them, based on votings and (later maybe?) on tags.
I wouldn't try to hard code a voting script into the core Joomla content files nor should you need to create you own plugin for this. There are lots of voting plugins on JED which I think will suits you needs. You can find them here:
http://extensions.joomla.org/extensions/clients-a-communities/ratings-a-reviews
One of my favourite plugins is this:
http://extensions.joomla.org/extensions/clients-a-communities/ratings-a-reviews/5483
Hope this helps.
can you tell me, how does the Google Ad sense works?
please explain me in brief..
There's quite a bit of information available from Google on the subject.
You want to know how to "use" it? or its algorithms? For the first one, they have a page for that, for the later one, I don't think you will even be able to figure it out:)
You place a javascript code in your site, and whenever someone visits your site, Google puts an ad in place. If the user clicks the add, you get money for it.
I assume your question is orientated around Google's contextual targeting.
In brief: Google sends a bot to read each page of your website. It looks at all the terms on the page and discards common words and instead tries to understand themes. Google also looks at adgroups of AdWords advertisers and looks to build an understanding of the themes of the keywords. Another algorithm pairs the two together so that relevant ads appear on a webpage.