Welcome Guest, Not a member yet? Register   Sign In
anchor tag inside form_label
#1

[eluser]zgames[/eluser]
this is what I want to do:
Code:
<label><a href="">Text1</a>Text2</label>

my setup:

Code:
$anchor = anchor(
'/bla/blah/',
'more text',
$variable
);

Code:
&lt;?php echo form_label('some text', $another_variable, $anchor); ?&gt;

this is what I get:

Code:
<label>some text</label>

any advice?
#2

[eluser]CroNiX[/eluser]
Yes, you are supplying the wrong parameters to form_label(). Where you are putting $anchor as the 3rd parameter is not correct as that is for extra parameters, like setting a classname or id. The first parameter is where anchor should be going (along with any other text) as that is the text that gets displayed in the <label>. The 2nd parameter is for the "name" of the label. See the userguide for more details on how to use it.




Theme © iAndrew 2016 - Forum software by © MyBB