client/src/StepFormGroup.js
// gets the right number of input fields based on the step index
gets the right number of input fields based on the step index
gets the right number of input fields based on the step index
renderInputFields(index) {
        let numOfInputs;
        try {
            numOfInputs = this.props.steps[index].numOfInputs;
        }
        catch(e) {
            numOfInputs = 0;
        }
        let inputNames;
        try {
            inputNames = this.props.steps[index].inputNames.slice();
        }
        catch(e) {
            inputNames = [];
        }
        let array = (numOfInputs !== 0) ? (Util.range(0, numOfInputs - 1, 1)) : [];
        let inputFields = array.map((i) => this.getInputField(i, inputNames[i]));
        return inputFields;
    }
renderInputFields ( index ) { let numOfInputs ; try { numOfInputs = this . props . steps [ index ] . numOfInputs ; } catch ( e ) { numOfInputs = 0 ; } let inputNames ; try { inputNames = this . props . steps [ index ] . inputNames . slice ( ) ; } catch ( e ) { inputNames = [ ] ; } let array = ( numOfInputs !== 0 ) ? ( Util . range ( 0 , numOfInputs - 1 , 1 ) ) : [ ] ; let inputFields = array . map ( ( i ) => this . getInputField ( i , inputNames [ i ] ) ) ; return inputFields ; }
gets the right number of input fields based on the step index
gets the right number of input fields based on the step index
// get the corresponding number of input fields // get the input names