insert the value of the input tab

Permalink
Hi i have use the login addon in concrete5 theme.
now i want that we have insert the value of the input tag or html inside just likehttp://www.arcnsw.org.au/
that when i click on the first field then the text dispear otherwise it should appear
thaks in advnce

phpsoftsol
 
adajad replied on at Permalink Reply
adajad
I don't have that block installed but I think you could do something like this in your view.php:

<input type="text" value="EMAIL" name="<?php echo $queryVar ?>" onFocus="this.value=''" onBlur="this.value='EMAIL'" />


Untested, but the onFocus and onBlur should work.
phpsoftsol replied on at Permalink Reply
phpsoftsol
Thanks for your reply....
But this is not working...
adajad replied on at Permalink Reply
adajad
hmm... it's the same as I use on my site ("Find contact" in search field).

http://www.spaceproduction.se/contacts...
phpsoftsol replied on at Permalink Reply
phpsoftsol
hmmmmmm....
i checked it, it is working on your site
But in my site i have to use the login add-on
but the code that you given that is not working in my site..

Thanks...
adajad replied on at Permalink Reply
adajad
Well.. as I said I don't have the block so I can't give you a better answer. Hopefully someone else will give you one that actually works for you.

Good luck!
jordanlev replied on at Permalink Best Answer Reply
jordanlev
The code @adajad provided won't work, because "<?php echo $queryVar ?>" isn't code that works with the login block (looks like that was copied from some kind of search form), and also because it will always reset the field to "EMAIL", even if the user entered their own email (you only want to show "Email" if they haven't entered anything in yet I assume).

This is unfortunately a complicated thing to do and requires some javascript and php programming. There is an easier solution but it doesn't work in IE: change line 30 of packages/login/blocks/login/view.php from this:
<?php   echo $form->text('uName',$uName); ?>

...to this:
<?php   echo $form->text('uName',$uName, array('placeholder' => 'Email Address')); ?>
phpsoftsol replied on at Permalink Reply
phpsoftsol
Hi,
thanks for your reply, it is working.....