Skip to content

Commit

Permalink
fixed chemical form
Browse files Browse the repository at this point in the history
  • Loading branch information
will2312 committed Mar 28, 2021
1 parent 6b88870 commit 0c62627
Showing 1 changed file with 17 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,63 +54,45 @@ private void setupForm() {

//Outfall --> Question: How do you do a subheading?

FormElementTextSingleLine temperature = new FormElementTextSingleLine().setTitle("Temperature (C) Change");
FormElementTextNumber tempData = FormElementTextNumber.createInstance(); //what data type is this?
tempVal = Double.parseDouble(tempData.getValue());
FormElementTextSingleLine temperature = new FormElementTextSingleLine().setTitle("Temperature (C) Change").setValue("0");
tempVal = Double.parseDouble(temperature.getValue());

FormElementTextSingleLine tubidity = new FormElementTextSingleLine().setTitle("Tubidity (NTU)");
FormElementTextNumber tubidityData = FormElementTextNumber.createInstance();
turbidityVal = Double.parseDouble(tubidityData.getValue());
FormElementTextSingleLine tubidity = new FormElementTextSingleLine().setTitle("Tubidity (NTU)").setValue("0");
turbidityVal = Double.parseDouble(tubidity.getValue());

FormElementTextSingleLine pH = new FormElementTextSingleLine().setTitle("pH");
FormElementTextNumber pHData = FormElementTextNumber.createInstance();
phVal = Double.parseDouble(pHData.getValue());
FormElementTextSingleLine pH = new FormElementTextSingleLine().setTitle("pH").setValue("0");
phVal = Double.parseDouble(pH.getValue());

FormElementTextSingleLine nitrate = new FormElementTextSingleLine().setTitle("Nitrate (mg/L)");
FormElementTextNumber nitrateData = FormElementTextNumber.createInstance();
nitrateVal = Double.parseDouble(nitrateData.getValue());
FormElementTextSingleLine nitrate = new FormElementTextSingleLine().setTitle("Nitrate (mg/L)").setValue("0");
nitrateVal = Double.parseDouble(nitrate.getValue());

FormElementTextSingleLine phosphate = new FormElementTextSingleLine().setTitle("Total Phosphate (mg/L)");
FormElementTextNumber phosphateData = FormElementTextNumber.createInstance();
phosphateVal = Double.parseDouble(nitrateData.getValue());
FormElementTextSingleLine phosphate = new FormElementTextSingleLine().setTitle("Total Phosphate (mg/L)").setValue("0");
phosphateVal = Double.parseDouble(phosphate.getValue());

FormElementTextSingleLine oxygen = new FormElementTextSingleLine().setTitle("Dissolved Oxygen (mg/L)");
FormElementTextNumber oxygenData = FormElementTextNumber.createInstance();
oxygenVal = Double.parseDouble(oxygenData.getValue());
FormElementTextSingleLine oxygen = new FormElementTextSingleLine().setTitle("Dissolved Oxygen (mg/L)").setValue("0");
oxygenVal = Double.parseDouble(oxygen.getValue());

FormElementTextSingleLine coli = new FormElementTextSingleLine().setTitle("E Coli (col/100mL)");
FormElementTextNumber coliData = FormElementTextNumber.createInstance();
coliVal = Double.parseDouble(coliData.getValue());
FormElementTextSingleLine coli = new FormElementTextSingleLine().setTitle("E Coli (col/100mL)").setValue("0");
coliVal = Double.parseDouble(coli.getValue());

FormElementTextSingleLine other1 = new FormElementTextSingleLine().setTitle("Other 1");
FormElementTextNumber other1Data = FormElementTextNumber.createInstance();
other1Val = Double.parseDouble(other1Data.getValue());
FormElementTextSingleLine other1 = new FormElementTextSingleLine().setTitle("Other 1").setValue("");
other1Val = Double.parseDouble(other1.getValue());

FormElementTextSingleLine other2 = new FormElementTextSingleLine().setTitle("Other 2");
FormElementTextNumber other2Data = FormElementTextNumber.createInstance();
FormElementTextSingleLine other2 = new FormElementTextSingleLine().setTitle("Other 2").setValue("");
other2Val = Double.parseDouble(other2.getValue());

List<BaseFormElement> formItems = new ArrayList<>();

formItems.add(title);
formItems.add(temperature);
formItems.add(tempData);
formItems.add(tubidity);
formItems.add(tubidityData);
formItems.add(pH);
formItems.add(pHData);
formItems.add(nitrate);
formItems.add(nitrateData);
formItems.add(phosphate);
formItems.add(phosphateData);
formItems.add(oxygen);
formItems.add(oxygenData);
formItems.add(coli);
formItems.add(coliData);
formItems.add(other1);
formItems.add(other1Data);
formItems.add(other2);
formItems.add(other2Data);

formBuilder.addFormElements(formItems);
}
Expand Down

0 comments on commit 0c62627

Please sign in to comment.