Welcome Guest, Not a member yet? Register   Sign In
Form button helper

[eluser]Daryl W[/eluser]
I am trying to use the form button helper "form_button()" to build a button that will link back to the controller like this:

<?php $data = array(
'name' => 'button',
'class' => 'button1',
'content' => 'Signup',
'onclick' => anchor('login/signup')
<?php echo form_button($data);?>

Which does not return the href correctly. for form_button helper interprates the first comma in the anchor helper as the end of the onclick parameter.

I can get this to work but it bypasses the controller:

<?php echo form_button('button','Signup','onclick="location.href=\'http://localhost/ds_con/login/signup\'"');?>

just not the button built with the data array.

Many thanks,


Messages In This Thread
Form button helper - by El Forum - 04-12-2010, 05:17 PM
Form button helper - by El Forum - 04-13-2010, 12:13 AM
Form button helper - by El Forum - 04-13-2010, 07:23 AM

Theme © iAndrew 2016 - Forum software by © MyBB