Skip to main content

Socrata forms

Socrata forms

The good: Socrata will create "Instant form" from a dataset. Instructions and a short how-to video are at https://training.kingcounty.gov/mod/page/view.php?id=97

The bad: the form it creates is not using our Bootstrap-based styling. You'll need to fix it by doing a bunch of find-and-replace in the HTML code.

The ugly: here are the changes you'll need to make. Your mileage may vary.

replace
line clear fix
with 
form-group

replace
<label for
with
<label class="col-sm-2 control-label" for
 
 replace
 </label>
 with
 </label>           
 <div class="col-sm-10">

replace
</div>
<div class="form-group text">
with
</div>
</div>
<div class="form-group text">

replace
<input type="submit" value="Submit" />
with
<button type="submit" class="btn btn-default">Submit</button>

replace
<input
with
<input class="form-control"

replace
<form class="formView socrataForm commonForm" 
with
<form 

replace
<select
with
<select class="form-control"

replace
<textarea class="fieldInput"
with
<textarea class="form-control"

replace
<div class="form-group checkbox">
with
<div class="checkbox">

replace
<input class="form-control" type="checkbox"
with
<input type="checkbox"

// need to do the same thing for radio buttons

replace
</label>
      <div class="fieldContainer checkboxInput">
with a line break

replace
</div>
    </div>
    <div class="checkbox">
with
</label>
</div>
<div class="checkbox">

expand_less