Customizing fields form.

Did you find a bug in Joomla! 3.x but aren't sure? This forum is the place to help figure out if the problem is a bug and how to report it. If you are an experienced Joomla! user and are certain that you have found a bug please use the Bug Tracker to submit your issue.
This forum is for discussion about bugs and to get help with reporting them to the Bug Tracker: https://issues.joomla.org

Moderator: ooffick

Forum rules
Please use the official Bug Tracker to report a bug: https://issues.joomla.org
Locked
User avatar
moje
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Fri May 14, 2010 9:03 pm
Location: PL > SL

Customizing fields form.

Post by moje » Fri Nov 16, 2012 1:13 pm

For me it's a bug, a big nasty bug.

I can't customize fields form in my template. I want remove

Code: Select all

<span class="star">&#160;*</span>
from label, add custom class to label and input, add custom attributes to label and input. Now I can use only this.:

Code: Select all

$this->form->getLabel('this_same_name');
$this->form->getInput('this_same_name');
Or it is something I dont know?

IMHO it should be something like this:

Code: Select all

$form->gL-this_same_name-id;
$form->gL-this_same_name-class;
$form->gL-this_same_name-for;
$form->gL-this_same_name-title;
$form->gL-this_same_name-text;
$form->gL-this_same_name-atribs;
$form->gI-this_same_name-id;
$form->gI-this_same_name-class;
$form->gI-this_same_name-name;
$form->gI-this_same_name-value;
$form->gI-this_same_name-atribs;
Good gods of Joomla! Can you fix it and give us Joomla! 3.0.3 with ability of full customizing?

User avatar
sitesrus
Joomla! Ace
Joomla! Ace
Posts: 1431
Joined: Mon Nov 12, 2012 10:48 pm

Re: Customizing fields form.

Post by sitesrus » Fri Nov 16, 2012 2:46 pm

I'm not sure what you're trying to do. What are you trying to customize? Your contact form, profile fields?

You can write plugins for profile fields....and for your contact form you can override com_contact in the appropriate override section available in joomla templates. Read up on both.

More details would help me help you.
I like working with Joomla :)

User avatar
moje
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Fri May 14, 2010 9:03 pm
Location: PL > SL

Re: Customizing fields form.

Post by moje » Fri Nov 16, 2012 3:42 pm

I'm using template override but my customizations are restricted by using:

Code: Select all

<?php echo $this->form->getLabel('contact_name'); ?>

<?php echo $this->form->getInput('contact_name'); ?>
It's give this html code:

Code: Select all

<label id="jform_contact_name-lbl" for="jform_contact_name" class="hasTip required" title="Nazwa::Twoja nazwa">Nazwa<span class="star">&#160;*</span></label>

<input type="text" name="jform[contact_name]" id="jform_contact_name" value="" class="required" size="30"/>
I can't do something like this:

Code: Select all

<label id="<?php echo $form->gL-this_same_name-id; ?>" for="<?php echo $form->gL-this_same_name-for; ?>" class="my-own-super-label-class <?php echo $form->gL-this_same_name-class; ?>" title="<?php echo $form->gL-this_same_name-title; ?>" <?php echo $form->gL-this_same_name-atribs; ?>><?php echo $form->gL-this_same_name-text; ?></label>

<input type="text" name="<?php echo $form->gI-this_same_name-name; ?>" id="<?php echo $form->gI-this_same_name-id; ?>" value="<?php echo $form->gI-this_same_name-value; ?>" class="my-own-super-input-class <?php echo $form->gI-this_same_name-class; ?>" size="30"/>
Or this:

Code: Select all

<label id="<?php echo $form->gL-this_same_name-id; ?>" for="<?php echo $form->gL-this_same_name-for; ?>" class="only-my-own-super-label-class" title="only my own title" <?php echo $form->gL-this_same_name-atribs; ?>><?php echo $form->gL-this_same_name-text; ?></label>

<input type="text" name="<?php echo $form->gI-this_same_name-name; ?>" id="<?php echo $form->gI-this_same_name-id; ?>" value="<?php echo $form->gI-this_same_name-value; ?>" class="only-my-own-super-input-class" placeholder="my own text" size="30"/>
No matter that is it a contact form, login form or another form, developer should have ability to customize it.

For me it's a bug ; )

User avatar
sitesrus
Joomla! Ace
Joomla! Ace
Posts: 1431
Joined: Mon Nov 12, 2012 10:48 pm

Re: Customizing fields form.

Post by sitesrus » Fri Nov 16, 2012 4:20 pm

lol, no sorry.

standard code so Joomla can use it. Ohterwise write your own component, module, plugin, etc.

Sorry.
I like working with Joomla :)

User avatar
moje
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Fri May 14, 2010 9:03 pm
Location: PL > SL

Re: Customizing fields form.

Post by moje » Fri Nov 16, 2012 5:51 pm

Where is sense of using template override, when you can't override a simple label and input?

Good work Joomla! team. Everybody love senseless code and senseless solutions.

User avatar
sitesrus
Joomla! Ace
Joomla! Ace
Posts: 1431
Joined: Mon Nov 12, 2012 10:48 pm

Re: Customizing fields form.

Post by sitesrus » Fri Nov 16, 2012 5:55 pm

Just use CSS to style the form the way you need to, or write your own contact form, or override the contact form?

I really don't understand why it's essential you have to do this? What benefit do you gain? Use jquery to do whatever you want clientside...it's easy and can manipulate the DOM?

There's a solution!
I like working with Joomla :)

User avatar
cynazem
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 247
Joined: Tue Feb 06, 2007 6:12 pm
Location: RJ
Contact:

Re: Customizing fields form.

Post by cynazem » Mon Nov 19, 2012 2:45 pm

I understand both!

It's great to have a standard code and be able to override it!
But it would be also great if the function getInput() had a parameter to insert a "placeholder" attribute to the input element.


Locked

Return to “Joomla! 3.x Bug Reporting”