How to get parent form id using knockout js?
<p>How to get form id or form class name using knockout js?</p>

<p><strong><code>&lt;span data-bind="text: $parent.id"&gt;&lt;/span&gt;</code></strong></p>

<p>I want to get at below location to form id or classname using ko.</p>

<pre><code>&lt;form class="form-shipping-address" id="shipping-form" data-bind="attr: {'data-hasrequired': $t('* Required Fields')}"&gt;

    &lt;div id="shipping-new-address-form" class="fieldset address"&gt;

        &lt;div class="field _required" data-bind="visible: visible, attr: {'name': element.dataScope}, css: additionalClasses" name="shippingAddress.firstname"&gt;

            &lt;label class="label" for="HV9JGHI"&gt;Firstname&lt;/label&gt;

            &lt;!-- I want to get here form id --&gt;
            &lt;span data-bind="text: $parent.id"&gt;&lt;/span&gt;


            &lt;input class="validate-length minimum-length-10 maximum-length-100" type="text" data-bind="
            value: value,
            valueUpdate: 'keyup',
            hasFocus: focused,
            attr: {
                name: inputName
            }" name="firstname"  id="HV9JGHI"&gt; 
        &lt;/div&gt;

    &lt;/div&gt;
&lt;/form&gt;
</code></pre>