Hi guys,
I have got a button in the edit form. It's called "Informovat," and when I click on this button, a small popup or modal shows up, and the user should have the choice to choose "Yes" or "No" - based on it, I will update another field or not.
Something like this does not work.
Could you help me?
Or I can use Dialog.open(), but I do not need to open another form, just a modal with confirmation.
I would appreciate your help on how to proceed.
Thank you so much.
Steo
I have tried some approaches, but none of them worked at all.
Long story short: I need one element #dialog and one function that accepts parameters to kendoDialog based on my conditions like - 1st Phase, 2nd Phase,.. there are more than 10 phases.
Thank you for your reply.
Steo
I am having trouble making this work. I have the same code used in another form and it works without issue. I am not sure if I missed a step but I am unable to figure this out.
@mnikitina, The two forms are on the same site. The is other code but it is pretty basic. I have commented out all other code and still receive the same error.
I have added the codes below inside the fd.spRendereed
//Dialog will appear when a record is found
$("#dialog").kendoDialog({
width: "400px",
title: "ATTENTION",
closable: false,
visible: false,
modal: true,
content: "<p>This user already has a record. Please edit this in the User Access Library.<p>",
actions: [
{text: 'Close', primary:true}
]
});
//Dialog appears when a record is not found
$("#dialog2").kendoDialog({
width: "400px",
title: "ATTENTION",
closable: false,
visible: false,
modal: true,
content: "<p>This User does not exist, please create a new record.<p>",
actions: [
{text: 'Close', primary:true}
]
});
//This function will show the Position message when question 2 is answered "No"
function PosMessage(){
if(fd.field('Question_2').value == 'No') {
$('.Position-Message').show();
fd.field('Terms').clear();
fd.field('Terms2').clear();
var dialog = $("#dialog").data("kendoDialog");
dialog.open();
}
else{
$('.Position-Message').hide();
}
};
//call function when a user changes status for Question 2
fd.field('Question_2').$on('change',PosMessage);
I get an error in the console on change of drop-down Question 2: