I'm trying to access the pre-filled values during the Magento onepage checkout (index.php/checkout/onepage/). Magento pre-fills the address if you select the "Shipping Address" to be the same as the "Billing Address" but later return one step back to edit the "Shipping Address" manually.
I'm having trouble to find the pre-filled values in the entire DOM. It's not possible to access the value with JavaScript what so ever.
Here's how I'm currently trying it:
document.getElementById('shipping:city').val
The DOM element looks like the following (no trace of the actual value):
<div class="input-field">
<input type="text" title="Stadt" name="shipping[city]" class="input-text required-entry" id="shipping:city" onchange="shipping.setSameAsBilling(false);">
<label for="shipping:city" class="required">Stadt</label>
</div>
How can I actually access those values using JavaScript?
:? – Kevin Goedecke Nov 28 '17 at 17:10document.getelement..., you can ignore the backlash. jQuery requires backslash to get the dom element. – Ner Nov 29 '17 at 03:22