Is there a way to have an alert box appear if the max number of additional items in a collection in Laserfiche Forms has been reached? Would I essentially set a counter that would be incremented every time the add button is pushed or is there a way to count the number of additional collections added?
Question
Question
Prompt when max number of rows added
asked on November 7, 2016
0
0
Answer
SELECTED ANSWER
replied on November 7, 2016
hi cristobal,
this code has worked for me for limit 3.
$(document).ready(function(){
$("#q1 a").click(function(event){
if($("ul .rpx").length==3)
{
alert("limit reached");
$(".cf-collection-append").addClass("hidebtnadd");
}
else
{
$(".cf-collection-append").removeClass("hidebtnadd");
}
});
});
q1 is the collection , and ul .rpx are the repeatable items.
and the hidebtnadd is to the add the add button everytime the limit is exceeded.
.hidebtnadd{display:none;}.
regards,
Maher Daher.
0
0
Replies
You are not allowed to reply in this post.
You are not allowed to follow up in this post.