Collect Leaflet (draw created data) properties Attribute from a popup to feature properties
<p>I have read helpful answered given By @ghybs Page: “<a href="https://stackoverflow.com/questions/34738805/update-properties-of-geojson-to-use-it-with-leaflet">update properties of geojson to use it with leaflet</a>”</p>

<p>but I am stuck to make it wok using a bootstrap popup window too collect data from user and hold it on feature.properties later I will collect multiple data from multiple marker, polygon polyline convert to geojson.
I can collect data form popup but data is showing same for every marker I am creating. feature.properties should different for each markers.  </p>

<p>pelase review my code : </p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
    osmAttrib = '&amp;copy; &lt;a href="http://openstreetmap.org/copyright"&gt;OpenStreetMap&lt;/a&gt; contributors',
    osm = L.tileLayer(osmUrl, {
        maxZoom: 18,
        attribution: osmAttrib
    });

map = L.map('map', {
    layers: [osm],
    center: [31.9500, 35.9333],
    zoom: 15
});
var editableLayers = L.geoJson().addTo(map);
map.addControl(new L.Control.Draw({
    edit: {
        featureGroup: editableLayers
    }
}));

map.on('draw:created', function (e) {
      var layer = e.layer,
        feature = layer.feature = layer.feature || {};
    feature.type = feature.type || "Feature";
    var props = feature.properties = feature.properties || {};
    //layer.feature = {properties: {}}; // No need to convert to GeoJSON.
    //var props = layer.feature.properties;
    props.action = null;

    editableLayers.addLayer(layer);
    addPopup(layer);
});

function addPopup(layer) {
    var content = document.getElementById('action');
    layer.feature.properties.action = content;

/* content.addEventListener("keyup", function () {
        layer.feature.properties.action = content;
    });*/

/*    layer.on("popupopen", function () {
        content.value = layer.feature.properties.desc;
      content.focus();
    });
    layer.bindPopup(content).openPopup();*/

    layer.on('click', function() {
        $('#action').val(layer.feature.properties.action);

            //content.value = layer.feature.properties.action;
            $('#attributes').modal({'show' : true, backdrop:'static', keyboard:false});
           $('#action').val(layer.feature.properties.action);
        });

}

document.getElementById("convert").addEventListener("click", function () {
    console.log(JSON.stringify(editableLayers.toGeoJSON(), null, 2));
});</code></pre>
<pre class="snippet-code-css lang-css prettyprint-override"><code>#map {
    height: 500px;
}</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
&lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"&gt;&lt;/script&gt;
&lt;link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/&gt;
  
&lt;script type="text/javascript" src="https://unpkg.com/leaflet@0.7.7/dist/leaflet-src.js"&gt;&lt;/script&gt;
&lt;link rel="stylesheet" href="https://unpkg.com/leaflet@0.7.7/dist/leaflet.css" type="text/css"&gt;
&lt;link rel="stylesheet" href="https://cdn.rawgit.com/Leaflet/Leaflet.draw/v0.3.0/dist/leaflet.draw.css" type="text/css"&gt;
&lt;!--js--&gt;
&lt;script type="text/javascript" src="https://cdn.rawgit.com/Leaflet/Leaflet.draw/v0.3.0/dist/leaflet.draw-src.js"&gt;&lt;/script&gt;
&lt;body&gt;
&lt;div id="map"&gt;&lt;/div&gt;
&lt;button id="convert"&gt;
Get all features to GeoJSON string
&lt;/button&gt;

&lt;div class="modal" id="attributes"&gt;
  &lt;div class="modal-dialog"&gt;
    &lt;div class="modal-content"&gt;
      &lt;div class="modal-header"&gt;
        &lt;h4 class="modal-title"&gt;Attribute Data&lt;/h4&gt;
      &lt;/div&gt;
      &lt;div class="modal-body"&gt;
       

&lt;div  class="content-scroll5"&gt;

&lt;div class="col-xs-2"&gt;
  &lt;label for="ex1"&gt;ACTION&lt;/label&gt;
  &lt;input class="form-control" name="action" id="actin" type="text"&gt;
&lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="modal-footer"&gt;
        &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;OK&lt;/button&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;</code></pre>
</div>
</div>
</p>