- Posts: 16
- Thank you received: 0
[SOLVED]: Chained Field not working
- kash99
- Topic Author
- Offline
- New Member
-
Less
More
9 years 7 months ago #2068
by kash99
Chined Field not working was created by kash99
Hi,
I have just purchased Chained Fields for K2 and running into the following problems:
1) Chained Fields not working. Both Parent and Child dropdown shows all the items. Child items are not displayed based on Parent's selection.
2) This problem was fixed for Multiple Extra Fields Group for k2 plugin in the following thread but as soon Chained Fields plugin is enabled, the same problem shows up again
www.joomreem.com/forum/28-bugs-and-usabi...ng-in-item-edit.html
Thanks
I have just purchased Chained Fields for K2 and running into the following problems:
1) Chained Fields not working. Both Parent and Child dropdown shows all the items. Child items are not displayed based on Parent's selection.
2) This problem was fixed for Multiple Extra Fields Group for k2 plugin in the following thread but as soon Chained Fields plugin is enabled, the same problem shows up again
www.joomreem.com/forum/28-bugs-and-usabi...ng-in-item-edit.html
Thanks
Please Log in or Create an account to join the conversation.
- mmmaug1977
-
- Offline
- Moderator
-
9 years 7 months ago #2069
by mmmaug1977
Replied by mmmaug1977 on topic Chined Field not working
Hi Kashif,
This is expected after applying the fix of the other thread, as I said there:
Let me find a workaround, do you expect to upload the website soon?
This is expected after applying the fix of the other thread, as I said there:
So I prefer to apply this fix case by case because it may affect other K2 plugins using the same event.
Let me find a workaround, do you expect to upload the website soon?
Please Log in or Create an account to join the conversation.
- kash99
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 16
- Thank you received: 0
9 years 7 months ago #2070
by kash99
Replied by kash99 on topic Chined Field not working
I will upload the website for you to debug. How do I privately share the credentials with you?
Please Log in or Create an account to join the conversation.
- mmmaug1977
-
- Offline
- Moderator
-
9 years 7 months ago #2071
by mmmaug1977
Replied by mmmaug1977 on topic Chined Field not working
Via
Contact Us
Please Log in or Create an account to join the conversation.
- kash99
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 16
- Thank you received: 0
9 years 7 months ago - 9 years 7 months ago #2072
by kash99
Replied by kash99 on topic Chined Field not working
Thanks! Just sent you a message via contact us
Last edit: 9 years 7 months ago by kash99.
Please Log in or Create an account to join the conversation.
- mmmaug1977
-
- Offline
- Moderator
-
9 years 7 months ago #2073
by mmmaug1977
Replied by mmmaug1977 on topic Chined Field not working
Please roll back the fix if you uploaded the site with it.
Please Log in or Create an account to join the conversation.
- kash99
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 16
- Thank you received: 0
9 years 7 months ago #2074
by kash99
Replied by kash99 on topic Chined Field not working
done
Please Log in or Create an account to join the conversation.
- mmmaug1977
-
- Offline
- Moderator
-
9 years 7 months ago #2075
by mmmaug1977
Replied by mmmaug1977 on topic Chined Field not working
Hi Kashif,
I can't find any workaround to get MEFG and Chained Fields working with your website except hacking the file /media/k2/assets/js/k2.js, just comment the lines from 433 to 463, typically the following lines:
Also, the fields configured with Chained Fields must have the "Show null option" parameter set to "Yes"
This way the 2 plugins will work.
For the horizontal tabs issue, I found that the jquery stylesheet files are not loaded, maybe they are disabled by any plugin or template configuration?
If you can get them to be loaded, tabs layout will work as expected.
I'm going to add a new tabs layout using bootstrap, I will finish it asap.
I can't find any workaround to get MEFG and Chained Fields working with your website except hacking the file /media/k2/assets/js/k2.js, just comment the lines from 433 to 463, typically the following lines:
Code:
selectsInstance('#catid').change(function() {
if (selectsInstance(this).find('option:selected').attr('disabled')) {
alert(K2Language[4]);
selectsInstance(this).val('0');
return;
}
var selectedValue = $K2(this).val();
var url = K2BasePath + 'index.php?option=com_k2&view=item&task=extraFields&cid=' + selectedValue + '&id=' + $K2('input[name=id]').val();
$K2('#extraFieldsContainer').fadeOut('slow', function() {
$K2.ajax({
url : url,
type : 'get',
success : function(response) {
$K2('#extraFieldsContainer').html(response);
initExtraFieldsEditor();
$K2('.k2Calendar').each(function() {
inputFieldID = $K2(this).attr('id');
imgFieldID = $K2(this).next().attr('id');
Calendar.setup({
inputField : inputFieldID,
ifFormat : "%Y-%m-%d",
button : imgFieldID,
align : "Tl",
singleClick : true
});
});
$K2('#extraFieldsContainer').fadeIn('slow');
}
});
});
});
Also, the fields configured with Chained Fields must have the "Show null option" parameter set to "Yes"
This way the 2 plugins will work.
For the horizontal tabs issue, I found that the jquery stylesheet files are not loaded, maybe they are disabled by any plugin or template configuration?
If you can get them to be loaded, tabs layout will work as expected.
I'm going to add a new tabs layout using bootstrap, I will finish it asap.
Please Log in or Create an account to join the conversation.
- kash99
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 16
- Thank you received: 0
9 years 7 months ago - 9 years 7 months ago #2076
by kash99
Replied by kash99 on topic Chined Field not working
It's not working properly on the test site.
When an item is is open for editing, the child field displays all the options. It is supposed to show only the options which are dependent on the option selected in the parent option. Only when another option is selected in the parent field, child options list gets updated.
It does not work on localhost at all. I have made the exact same change in the localhost code and set the extra fields parameters exactly the same but not working on localhost. How do I fix it?
Another issue, also on the localhost, when establishing parent child field options, first option on the child list is not select-able unless another option is selected first.
When an item is is open for editing, the child field displays all the options. It is supposed to show only the options which are dependent on the option selected in the parent option. Only when another option is selected in the parent field, child options list gets updated.
It does not work on localhost at all. I have made the exact same change in the localhost code and set the extra fields parameters exactly the same but not working on localhost. How do I fix it?
Another issue, also on the localhost, when establishing parent child field options, first option on the child list is not select-able unless another option is selected first.
Last edit: 9 years 7 months ago by kash99.
Please Log in or Create an account to join the conversation.
- mmmaug1977
-
- Offline
- Moderator
-
9 years 7 months ago #2077
by mmmaug1977
Replied by mmmaug1977 on topic Chined Field not working
Is the localhost connected to the internet?
I'm asking this question because K2 on your site is configured to load a remote copy of jQuery, so if it is not connected to internet, jQuery will not be loaded and it will not work at all.
I'm asking this question because K2 on your site is configured to load a remote copy of jQuery, so if it is not connected to internet, jQuery will not be loaded and it will not work at all.
Please Log in or Create an account to join the conversation.