Skip to content

cvd/code-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

The problem:

You want to be able to take any valid html that is decorated with a certain set of classes
and impose a form on top of it to allow users to select what data should go into each of those elements.
The spec for the input html is as follows: Any element (html tag) that is to have some data put into it is
decorated with the class 'option' and each element with the class 'option' should have a unique ID that should
be used as form input name for the form element that is placed within it. The options for the user to select
between are the following key-value pairs:

  OPTIONS = [
    [nil , "Choose Field: "],
    [:teamkey, "Team Name"],
    [:agekey,  "Team Age"],
    [:coach_name, "Coach Name"],
    [:team_rating,"Team Rating"]
  ]

The 0 index should be the option 'value' and the 1 index should be the option text.

Use the input.html file as a sample input file.

sample-output.html is a sample of what your code should output

About

its a code test

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published