Access text field value in block

I am new in magento extension development .

How i access street value in edit.phtml of 'id=street_1' textfeild in Edit block .

Please give me suggestion in detail.

Thanks.

Solutions

You can access it in _prepareLayout from the Edit.php block like this.

$value = $this->_address->getStreet(1);

EDIT-based on comments

You can access the address before saving it in Mage_Customer_AddressController::formPostAction with

$street = $this->getRequest()->getPost('street'); 
$part1 = $street[0];

To access/modify/validate the address before saving it use the event customer_address_save_before.

Similar questions

Custom Option text field value from order id
I want to show values from Custom option text field in product view page if customer already ordered the product. I don't have fixed options attribute they may change like custom size, sleeve size, etc. I am trying following code and fetch last order. I don't know how to get product custom options (text field) attribute dynamically.
Display quantity value inside text field in frontend
we are using magento marketplace multi-vendor site, means where sellers can sell products through site. we are displaying price in frontend using following code : Phtml script Its displaying like this : In the same way we are using following code to display quantity. Phtml Script quantity is displaying like this : i want to display quanity as like ...
Add a value to text input field in custom options - frontend
I want to add a default value to text input field in custom options to pass the magento validation. I try to do this in javascript like that: jQuery(".product-options dd input.input-text").attr('value', '--------'); But in some places I need to remove this value: jQuery(".product-options dd input.input-text").attr('value', ''); and when I use this ...
How to hide the tab when no value is entered in the text field?
I have added a text-field attribute in product-collateral tab in details page with following code: when I enter the value in the text field at backend it is perfectly getting displayed. But the error is that the tab is getting displayed even when I enter no value in that field. Kindly help me to resolve this issue.
How to set default value for text and select field in admin new UI form in magento 2
I cant set any default value for textfield or select in my custom admin new ui form. In edit form it works. I want to set system config values as default values. Here is my Dataprovider.php Here is my form.xml
magento2 how to change product price while change the value of text field?
Hi i would like to change my product price dynamically while change the custom option text field value. I have written the code as shown below

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.