Using Rules Editor to limit number of attachments

Avatar

Avatar
Validate 1
Level 2
lsmurph
Level 2

Like

1 like

Total Posts

42 posts

Correct reply

3 solutions
Top badges earned
Validate 1
Ignite 1
Boost 1
Affirm 3
Affirm 1
View profile

Avatar
Validate 1
Level 2
lsmurph
Level 2

Like

1 like

Total Posts

42 posts

Correct reply

3 solutions
Top badges earned
Validate 1
Ignite 1
Boost 1
Affirm 3
Affirm 1
View profile
lsmurph
Level 2

15-04-2021

I recently noticed that you can either select one or multiple attachments for an adaptive form. I would l ike to limit the number of attachments to 4. How can I do that?

Accepted Solutions (0)

Answers (2)

Answers (2)

Avatar

Avatar
Springboard
Level 10
Mayank_Gandhi
Level 10

Likes

327 likes

Total Posts

1,150 posts

Correct reply

185 solutions
Top badges earned
Springboard
Establish
Validate 1
Contributor 2
Ignite 5
View profile

Avatar
Springboard
Level 10
Mayank_Gandhi
Level 10

Likes

327 likes

Total Posts

1,150 posts

Correct reply

185 solutions
Top badges earned
Springboard
Establish
Validate 1
Contributor 2
Ignite 5
View profile
Mayank_Gandhi
Level 10

26-04-2021

@lsmurph use this on value commit of attachment: 

guideBridge.getFileAttachmentsInfo({
success:function(list) {
for(var i = 0; i< list.length; i++) {
// console.log(list[i].name + " "+ list[i].path);
if(list.length>4)
document.getElementsByClassName('button-default button-medium guide-fu-attach-button')[0].disabled=true;
}
}
});

Avatar

Avatar
Springboard
Level 10
Mayank_Gandhi
Level 10

Likes

327 likes

Total Posts

1,150 posts

Correct reply

185 solutions
Top badges earned
Springboard
Establish
Validate 1
Contributor 2
Ignite 5
View profile

Avatar
Springboard
Level 10
Mayank_Gandhi
Level 10

Likes

327 likes

Total Posts

1,150 posts

Correct reply

185 solutions
Top badges earned
Springboard
Establish
Validate 1
Contributor 2
Ignite 5
View profile
Mayank_Gandhi
Level 10

23-04-2021

@lsmurph Can be handled but may require custom code. Let me see if I have one in the archive.