Answered
09 Feb 2016
in reply to
Missing user
Link to this post
Hi Matt,
Yes, you can achieve it following the example below;
1) Create one flag field that will tell what stages have been completed. It can be a textfield or option field with options such as; Completed Stage 1, Completed Stage 2, Completed Stage 3, etc..
2) On each form add this field and keep it hidden using the CSS widget and putting the code like ;
.TextfieldDeveloperName
{
Display:none;
}
3) At Stage 1 form, you can have a javascript function to trigger on "submit button" which will simply set the hidden field value = " Completed Stage 1". You can call this javascript function under the advance property of Submit button by putting its name() in "OnClientClick"
4) Also, add another javascript function on the Stage1Form that will execute on form load and will check if the stage one has already been completed and then simply change the Gray start color into Yellow or any other color as you like. Make sure you select the property of javascript widget to place by the body closing tag.
You can put the code below at a page level or template level so that you don't need to place it in each form of five stages. Example Code;
$(window).load(function() {
var checkhidddenfieldstatus=$find($(".DeveloperNameofYourHiddenField").attr("id")).get_value();
if(checkhidddenfieldstatus!="" && checkhidddenfieldstatus!=null)
{
if (checkhidddenfieldstatus=="Completed Stage 1")
{
// set the star background color
$('.IdofyourstarforStage1object').css('background-color','yellow');
}
if (checkhidddenfieldstatus=="Completed Stage 2")
{
// set the star background color
$('.IdofyourstarforStage2object').css('background-color','yellow');
}
if (checkhidddenfieldstatus=="Completed Stage 3")
{
// set the star background color
$('.IdofyourstarforStage3object').css('background-color','yellow');
}
}
});
If you have any further questions you can also discuss on our daily Q & A sessions.
Best Regards
Syed
Last modified on 09 Feb 2016 17:02 by Missing user