PDA

View Full Version : how to transform a php form to sencha ?



laurentmars
29 Oct 2010, 8:42 AM
Hi, I would like to transform a php form in sencha touch format, I was looking on the kitchen sinking exemple but i don't know where to begin :

here's my code :


<div class="login-box">
<div class="category-head"><h2><?php echo $this->__('Login or Create an Account') ?></h2></div>
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
<form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="login-form">
<div class="registered-users">
<div class="content">
<h4><?php echo $this->__('Registered Customers') ?></h4>
<p><?php echo $this->__('If you have an account with us, please log in.') ?></p>
<ul class="form-list">
<li>
<div class="col2-alt-set">
<div class="col-1">
<label for="email"><?php echo $this->__('Email Address') ?> <span class="required">*</span></label>
</div>
<div class="col-2">
<input name="login[username]" value="<?php echo $this->htmlEscape($this->getUsername()) ?>" title="<?php echo $this->__('Email Address') ?>" id="email" type="text" class="input-text required-entry validate-email" />
</div>
</div><div class="clear"></div>
</li>
<li>
<div class="col2-alt-set">
<div class="col-1">
<label for="pass"><?php echo $this->__('Password') ?> <span class="required">*</span></label><br />
</div>
<div class="col-2">
<input name="login[password]" type="password" class="input-text required-entry validate-password" id="pass" />
</div>
</div><div class="clear"></div>
</li>
</ul>
</div>
<div class="col2-alt-set button-set">
<div class="col-1">
<p class="required"><?php echo $this->__('* Required Fields') ?></p>
</div>
<div class="col-2">
<div class="form-buttons">
<button class="form-button" type="submit" name="send" id="send2"><span><?php echo $this->__('Login') ?></span></button><br />
<a href="<?php echo $this->getForgotPasswordUrl() ?>" class="left"><?php echo $this->__('Forgot Your Password?') ?></a>
</div>
</div>
</div><div class="clear"></div>
</div>
<div class="new-users">
<div class="content">
<h4><?php echo $this->__('New Customers') ?></h4>
<p><?php echo $this->__('You want to be our new customer.') ?></p>
</div>
<div class="button-set">
<button class="form-button right" onclick="window.location='<?php echo $this->getCreateAccountUrl() ?>';" type="button"><span><?php echo $this->__('Create an Account') ?></span></button>
</div>
</div>
</form>
</div>


thanks for your help


laurent

laurentmars
30 Oct 2010, 8:56 AM
no-one have an answer, even with a simple exemple ??

thanks

profunctional
30 Oct 2010, 2:54 PM
You can just build that form in sencha touch. Just add form fields into the items array.
If you follow the kitchen sinks form demo, you can't go wrong.