Issue with conditionaly checkbox
Hi,
I have a small problem
If the TranslationAvailability is check, the field 'TranslationItemCreation needs to be check.
If the TranslationAvailability is not check, the field 'TranslationItemCreation needs to be uncheck
Problem
When I check the field TranslationAvailability, the field TranslationItemCreation is correctly check, but when I uncheck it the TranslationAvailability is keeping check
function setTranslationItemCreation()
{
var v = fd.field('TranslationAvailability').control().value();
if (fd.field('TranslationAvailability').value())
{
fd.field('TranslationItemCreation').value('Yes');
}
else
{
fd.field('TranslationItemCreation').value('No');
}
}
// Subscribe on status change
fd.field('TranslationAvailability').control().change(function ()
{
setTranslationItemCreation();
});
// Initialize
setTranslationItemCreation();
Can you help me to solve my issue
Thanks
Catherine
I have a small problem
If the TranslationAvailability is check, the field 'TranslationItemCreation needs to be check.
If the TranslationAvailability is not check, the field 'TranslationItemCreation needs to be uncheck
Problem
When I check the field TranslationAvailability, the field TranslationItemCreation is correctly check, but when I uncheck it the TranslationAvailability is keeping check
function setTranslationItemCreation()
{
var v = fd.field('TranslationAvailability').control().value();
if (fd.field('TranslationAvailability').value())
{
fd.field('TranslationItemCreation').value('Yes');
}
else
{
fd.field('TranslationItemCreation').value('No');
}
}
// Subscribe on status change
fd.field('TranslationAvailability').control().change(function ()
{
setTranslationItemCreation();
});
// Initialize
setTranslationItemCreation();
Can you help me to solve my issue
Thanks
Catherine
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Dear Catherine,
Please, try this code:
Please, try this code:
Code: Select all
function setTranslationItemCreation(){
if(fd.field('TranslationAvailability').value()){
fd.field('TranslationItemCreation').value(true);
}
else{
fd.field('TranslationItemCreation').value(false);
}
}
// Subscribe on status change
fd.field('TranslationAvailability').change(function(){
setTranslationItemCreation();
});
// Initialize
setTranslationItemCreation();
Cheers
-
- Information
-
Who is online
Users browsing this forum: No registered users and 14 guests