Created
August 31, 2011 19:01
-
-
Save manishdas/1184399 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
line = CF::Line.new("bizzcard_army", "Digitization") | |
station = CF::Station.new({:type => "work"}) | |
line.stations station | |
input_format_1 = CF::InputFormat.new({:label => "Company",:field_type => "text_data",:value => "Google", :required => true, :validation_format => "general"}) | |
input_format_2 = CF::InputFormat.new({:label => "Website",:field_type => "text_data",:value => "www.google.com", :required => true, :validation_format => "url"}) | |
line.stations.first.input_formats input_format_1 | |
line.stations.first.input_formats input_format_2 | |
worker = CF::HumanWorker.new({:number => 1, :reward => 20}) | |
line.stations.first.worker = worker | |
form = CF::TaskForm.new({:title => "Enter text from a business card image", :instruction => "Describe"}) | |
line.stations.first.instruction = form | |
form_field_1 = CF::FormField.new({:label => "First Name", :field_type => "SA", :required => "true"}) | |
line.stations.first.form.form_fields form_field_1 | |
form_field_2 = CF::FormField.new({:label => "Middle Name", :field_type => "SA"}) | |
line.stations.first.form.form_fields form_field_2 | |
form_field_3 = CF::FormField.new({:label => "Last Name", :field_type => "SA", :required => "true"}) | |
line.stations.first.form.form_fields form_field_3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment