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 / cascade is not working when edit

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

cascade is not working when edit

More
11 years 5 months ago - 11 years 4 months ago #1816 by wafa
cascade is not working when edit was created by wafa
in this animation below:


thanks

tunisie annonce


AdsManager : 3.0.4
Joomla : Joomla! 3.4.1
Host : OVH
Last edit: 11 years 4 months ago by wafa.
The following user(s) said Thank You: adarr
More
11 years 5 months ago #1820 by tompap
Replied by tompap on topic cascade is not working when edit profile
Hello, first it seems that it's not "cascade plugin", because you create a "region field" for each value of "city". You are using here "conditional fields". We will check that and come back to you
The following user(s) said Thank You: wafa, adarr
More
11 years 5 months ago #1854 by wafa
Replied by wafa on topic cascade is not working when edit profile

tompap wrote: Hello, first it seems that it's not "cascade plugin", because you create a "region field" for each value of "city". You are using here "conditional fields". We will check that and come back to you


exactly!
I'm using conditional fields to show city depending on the state selected

i remember , in the 2.92 when trying to edit profile it was working well
in this new version (2.9.5) it's showing all the fields in the same time (in the front end and the back end)!

hope to fix this bug next version!

thank you for your suppport

tunisie annonce


AdsManager : 3.0.4
Joomla : Joomla! 3.4.1
Host : OVH
The following user(s) said Thank You: adarr
More
11 years 5 months ago #1907 by tompap
Replied by tompap on topic cascade is not working when edit profile
Please add the following code at the end of views/profile/tmpl/default.php
|script|
function checkdependency(child,parentname,parentvalue) {
	//Simple checkbox
	if (jQ('input[name="'+parentname+'"]').is(':checkbox')) {
		//alert("test");
		if (jQ('input[name="'+parentname+'"]').attr('checked')) {
			jQ('#adminForm #'+child).show();
			jQ('#adminForm #tr_'+child).show();
		}
		else {
			jQ('#adminForm #'+child).hide();
			jQ('#adminForm #tr_'+child).hide();
 
			//cleanup child field 
			if (jQ('#adminForm #'+child).is(':checkbox') || jQ('#adminForm #'+child).is(':radio')) {
				jQ('#adminForm #'+child).attr('checked', false);
			}
			else {
				jQ('#adminForm #'+child).val = '';
			}
		} 
	}
	//If checkboxes or radio buttons, special treatment
	else if (jQ('input[name="'+parentname+'"]').is(':radio')  || jQ('input[name="'+parentname+'[]"]').is(':checkbox')) {
		var find = false;
		var allVals = [];
		jQ("input:checked").each(function() {
			if (jQ(this).val() == parentvalue) {	
				jQ('#adminForm #'+child).show();
				jQ('#adminForm #tr_'+child).show();
				find = true;
			}
		});
 
		if (find == false) {
			jQ('#adminForm #'+child).hide();
			jQ('#adminForm #tr_'+child).hide();
 
			//cleanup child field 
			if (jQ('#adminForm #'+child).is(':checkbox') || jQ('#adminForm #'+child).is(':radio')) {
				jQ('#adminForm #'+child).attr('checked', false);
			}
			else {
				jQ('#adminForm #'+child).val = '';
			}
		}
 
	}
	//simple text
	else if (jQ('#adminForm #'+parentname).val() == parentvalue) {
		jQ('#adminForm #'+child).show();
		jQ('#adminForm #tr_'+child).show();
	} 
	else {
		jQ('#adminForm #'+child).hide();
		jQ('#adminForm #tr_'+child).hide();
 
		//cleanup child field 
		if (jQ('#adminForm #'+child).is(':checkbox') || jQ('#adminForm #'+child).is(':radio')) {
			jQ('#adminForm #'+child).attr('checked', false);
		}
		else {
			jQ('#adminForm #'+child).val = '';
		}
	}
}
function dependency(child,parentname,parentvalue) {
	//if checkboxes
	jQ('input[name="'+parentname+'[]"]').change(function() {
		checkdependency(child,parentname,parentvalue);
	});
	//if buttons radio
	jQ('input[name="'+parentname+'"]').change(function() {
		checkdependency(child,parentname,parentvalue);
	});
	jQ('#'+parentname).click(function() {
		checkdependency(child,parentname,parentvalue);
	});
	checkdependency(child,parentname,parentvalue);
}
 
jQ(document).ready(function() {
	<?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 } 
	}?>
});
|/script|

replace |script| by < ... > same for |/script|
The following user(s) said Thank You: adarr
More
11 years 5 months ago #1920 by wafa
Replied by wafa on topic cascade is not working when edit profile
j'ai ajouté ce bout de code dans: /www/components/com_adsmanager/views/profile/tmpl/default.php
rien n'a changé! toujours le conditional fields non fonctionnel et ça affiche toutes les champs ad_city

merci quand même

tunisie annonce


AdsManager : 3.0.4
Joomla : Joomla! 3.4.1
Host : OVH
The following user(s) said Thank You: adarr
More
11 years 5 months ago #1944 by tompap
Replied by tompap on topic cascade is not working when edit profile
Il faut attendre la 2.9.6 cette semaine, le code n'a pas du etre bien inseré.
The following user(s) said Thank You: wafa, adarr
Moderators: perry
Time to create page: 0.201 seconds
Powered by Kunena Forum