Skip to content

Instantly share code, notes, and snippets.

@vadim4err
Created May 23, 2015 14:49
Show Gist options
  • Select an option

  • Save vadim4err/4500b6b635e075bc194e to your computer and use it in GitHub Desktop.

Select an option

Save vadim4err/4500b6b635e075bc194e to your computer and use it in GitHub Desktop.
magento form
<?php
include_once 'app/Mage.php';
Mage::init();
$form=new Varien_Data_Form(array(
'id'=>'form',
'action'=>Mage::getUrl('localhost/magento/magento/some_form.php'),
'method'=>'post',
'enctype'=>'multipart/form-data'));
$form->addField('radio','text',array('label'=>'name'));
$form->addField('submit','submit',array('label'=>'Submit','name'=>'submit','value'=>'Submit'));
echo $form->toHtml();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment