Login or create new account.

By registering on joomprod.com, you will have immediate access to all our free products and to the public side of our support forum.

Enjoy our subscriptions.

Each of our subscriptions allow you to enjoy the private side of the support forum and all the update of our products for a period ranging from 3 months to 1 year.

Payment And immediate download.

After subscribing to one of our subscription, the products are immediately downloadable.

Login

Or Register
Accueil / forum / Public Forum / Main Forum / [RESOLVED] Field in individual styles

Support Availability Because we must sleep sometimes

Working days: Monday to Friday.
Reply time: Depending on the complexity of your support issue it's usually between a few hours to 48 hours.

Support is only guaranteed to paid subscribers

AdsManager - End of life

It is with great regrets that we have chosen to end the developpement of Adsmanager and its other associated components.

AdsManager is born 10 years ago and, as of today, the number of new subscriptions and downloads have fallen and we cannot maintain the component anymore.

All active subscribers will be able to continue enjoying support until the end of their subscription.

The components will be free and no support will be provided anymore for the other users.

×

Notice

The forum is in read only mode.

× OLD Forum post could be checked here : forum.joomprod.com

[RESOLVED] Field in individual styles

More
12 years 5 months ago - 12 years 3 months ago #5267 by ddn821
Please tell me how to "wrap" the individual fields in the individual styles. For example in the template

... / components / com_adsmanager / views / details / tmpl / default.php


is the code


original code



As far as I understand here displays all fields defined in the admin area, separated only <p>. And here is how to insert the other fields (manually), but enclosed in some <span>, provided that the field name is known (ad_city or ad_type etc.).
The result should be something like:



some code




Or maybe somehow different?

Thank you.
P.S. Sorry for my english :whistle:
Last edit: 12 years 3 months ago by loic.
More
12 years 5 months ago #5293 by loic
Replied by loic on topic Field in individual styles
Hello,

You can display the field by there name like this :
<span class="my-class"><?php echo htmlspecialchars($content->field_name); ?></span>
 
//example with ad_city
<span class="my-class"><?php echo htmlspecialchars($content->ad_city); ?></span>
 
//and if $content doesn't work
<span class="my-class"><?php echo htmlspecialchars($this->content->ad_city); ?></span>
More
12 years 4 months ago - 12 years 4 months ago #5748 by fpenet
Replied by fpenet on topic Field in individual styles
Hello,
I created a whole personnalized edit form thanks to your tip. I used the following code:
<span class="my-class"><?php echo $this->field->showFieldLabel($this->fields['ad_Typedelocation'],$this->content,$this->default);?></span>
<span class="my-class2"><?php echo $this->field->showFieldForm($this->fields['ad_Typedelocation'],$this->content,$this->default).'</br>';?></span>


My problem is that the field dependency is not taken into consideration.

Did I forget something in the code?
Last edit: 12 years 4 months ago by fpenet. Reason: modif de l'apparence du code
More
12 years 4 months ago #5767 by tompap
Replied by tompap on topic Field in individual styles
Did you copy paste in your edit form, the javascript part
jQ(document).ready(function() {
	updateFields();
 
	<?php foreach($this->fields as $field) { 
		if (@$field->options->is_conditional_field == 1) { ?>
	dependency('<?php echo $field->name?>',
			   '<?php echo $field->options->conditional_parent_name?>',
			   '<?php echo $field->options->conditional_parent_value?>');
		<?php } 
	}?>
});
More
12 years 4 months ago #5779 by fpenet
Replied by fpenet on topic Field in individual styles
I didn't have to. My edit form is the same file as the original edit form file. I just add some lines.

So, the code you gave me already was in the bottom of the file.


I wasn't enought specific in my question. The dependency for the field label is not working but for the field form, it is.
More
12 years 4 months ago #5780 by tompap
Replied by tompap on topic Field in individual styles
Ok so in this case you have to update the dependency javascript function
You will find lines like:

jQ('#adminForm #tr_'+child).show();

so in fact the label + input should be contained in a div/span/tr whaetever with the id = tr_ad_XXXX
Moderators: perry
Time to create page: 0.064 seconds
Powered by Kunena Forum