AnsweredAssumed Answered

graphics.SetAttributes not picking the input values

Question asked by alex.gole_ELDORADOCOUNTY on Dec 9, 2016
Latest reply on Dec 9, 2016 by rscheitlin

Hi all,

 

I am using .setAttributes to a graphics in order to add the graphic and attributes to a feature layer. The problem I have is that s .setAttributes does not seem to work with my input values, except when it is hard coded.

 

projectarea.setAttributes({ "START_DATE": $("#tesr").val(), "FINISH_DATE": "09/09/2019", "Name": "Alex", "PROJECT_ID": "3", "TREE_COUNT": "3", "ACRES": "4" });

 

 

For example, This will not :

$("#tesr").val()

 

This will work:

"22"

This is my form:

 <form>
                 
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">Project ID</span>
                            <input type="text" class="form-control" placeholder="Project ID" id="tesr">
                        </div>
                    </div>
                </form>

Any idea what is wrong with what I am doing?

Outcomes