The CreatorCon Call for Content is officially open! Get started here.

How to restrict or disable the add button in Multi Row Variable Set after the 5th Row?

RISHAV SANSON
Tera Contributor

I have to restrict the number of rows to 5 but i am not be able to restrict or disable the add button. Could you please share some thoughts or suggestions ? 

33 REPLIES 33

Sharique Azim
Mega Sage

None of the script mentioned above, works for us in both desktop .In Madrid

Even if the limits are set(i have checked putting alerts)

but the add button cannot be hidden/read only OOB.

Why the OOB  functionality was not triggered in our case?

Hi Shariq, 

You try script here for restricting the number of rows you wish to add by using onLoad under Catalog Client Script. 

function onLoad() {
	//Type appropriate comment here, and begin script below
	
	var gen_info = g_form.getField("replace with your variable set internal name"); 
	if (gen_info != null) {
		gen_info.max_rows_size = 5; //number of rows you want to restrict
	}
	
}

Kindly press helpful or mark as correct answer if able to help you solve your issue. 

Thanks. 

Sorry Si Min, but the code seems be identical to the code included in my answer 3 months ago (see above). Probably you skipped the post during reading.

Ujjwal2
Tera Contributor

Set the variable set attribute max_rows=value

 

find_real_file.png

Hi Ujjwal,

 

I tried to find this field but couldn't. it is missing, Could you let me know where can find it?

 

thanks

 

Harish Gubba