The Joomla! Forum ™



Forum rules


Please use the mailing list here: http://groups.google.com/group/joomla-dev-general rather than this forum.



Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Submit button
PostPosted: Fri Feb 24, 2012 12:09 am 
User avatar
Joomla! Explorer
Joomla! Explorer

Joined: Fri Aug 25, 2006 2:39 pm
Posts: 426
Location: United Kingdom - Aldershot
I can create a select list with this code

Code:
JHTML::_('select.genericlist'.......


Is there an option that will do the same for a submit button ???

_________________
I may be wrong and I often am.
http://www.yourparish.co.uk - Free listing directory
IMHO Chrome is the best


Last edited by spike1968 on Fri Feb 24, 2012 12:20 am, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: Submit button
PostPosted: Fri Feb 24, 2012 12:12 am 
User avatar
Joomla! Explorer
Joomla! Explorer

Joined: Fri Aug 25, 2006 2:39 pm
Posts: 426
Location: United Kingdom - Aldershot
Thought i had found the answer here

http://joomlacode.org/gf/project/jhtmlinput/

but I haven't. :'(

Anybody with ideas.

_________________
I may be wrong and I often am.
http://www.yourparish.co.uk - Free listing directory
IMHO Chrome is the best


Top
 Profile  
 
 Post subject: Re: Submit button
PostPosted: Fri Feb 24, 2012 9:22 am 
User avatar
Joomla! Intern
Joomla! Intern

Joined: Tue May 06, 2008 12:28 pm
Posts: 96
Hey spike,

Question is why do you need such a function?
After all JHTML provides an easy way to generate complex html elements but when it comes to a simple submit button why don you just do

Code:
$button_label=JText::_('click me');
$my_button="<button type='submit'>".$button_label."</button>";


If you better explain what you are trying to do?


Top
 Profile  
 
 Post subject: Re: Submit button
PostPosted: Fri Feb 24, 2012 10:22 am 
User avatar
Joomla! Explorer
Joomla! Explorer

Joined: Fri Aug 25, 2006 2:39 pm
Posts: 426
Location: United Kingdom - Aldershot
shakur1911 wrote:
Hey spike,

Question is why do you need such a function?
After all JHTML provides an easy way to generate complex html elements but when it comes to a simple submit button why don you just do

Code:
$button_label=JText::_('click me');
$my_button="<button type='submit'>".$button_label."</button>";


If you better explain what you are trying to do?


I think it's because of my limited knowledge of how modules work, as I am building my first after so many years of working with Joomla. I am self taught in every aspect of php, javascript and ajax so everything I do is a learning process.

I have almost finished writing a module that provides chained select boxes for a module position which gathers the data from categories and returns the selected article.

Now i've got the basic function working I am now writing the niceties and one element is the display of the button only when the final select box has been used.

I have tried using the button code as you mentioned and yes, in morning not so tired after thought, you are perfectly right why would I need something with JHTML that is so simple.

Obviously something in my code is not quite right and maybe a mornings deliberation will solve my problem.

_________________
I may be wrong and I often am.
http://www.yourparish.co.uk - Free listing directory
IMHO Chrome is the best


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 



Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group