form_open and Foundation Abide |
Hi All,
Does anyone know of a way of using form_open to produce something like the following: Code: <form data-abide> I know how to do this by writing the code by hand, but it would be nice to use the helpers. Edit: This is with CI 3.0 dev etc.
Did you check out the part in the user guide showing how to add attributes to form_open()?
(02-18-2015, 08:39 AM)CroNiX Wrote: Did you check out the part in the user guide showing how to add attributes to form_open()? Yes, the attributes are of the form: yyyy= "aaa" Which is not what is needed. Here we only need the yyyy part without any of the equals part. If you know of a way of formatting the attributes to make them ignore the = part them I will be happy to learn that trick.
According to the user guide for version 3, you can use a string instead of an array as the 2nd parameter.
Code: echo form_open('email/send', 'class="email" id="myform" data-abide'); (02-18-2015, 08:45 AM)CroNiX Wrote: According to the user guide for version 3, you can use a string instead of an array as the 2nd parameter. Thank you, you are absolutely correct. http://www.codeigniter.com/userguide3/he...elper.html Clearly says that the second parameter can be a string. Even looking at it, I never saw the ' single quotes around the item. Silly me.
how to call a function in class with form_open()?
PHP Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); i want to call function aksi in view with form_open, but not call function? PHP Code: <?php echo form_open('login/aksi');?>
The first argument to form_open does not call a function, it simply sets the URL to which the form will be posted when you submit it. So you still have to add a submit button to your form or submit it with some other method before it will call the method in your controller.
|
Welcome Guest, Not a member yet? Register Sign In |