[Help] Creating a pop-up on a catalog item

Jordan14
Giga Expert

Hello,

I have a catalog item I would would like to create a pop-up for once a user presses a specific button or value is entered.

For example:

Once the user inputs a value into a specific field I would like the user to be prompted with a pop-up that doesn't allow them to go further until I've pressed "Okay" or "I agree.", in this case it will contain information about "terms of use" that applies to what the user is ordering via the catalog item.

Any Ideas?

Kind Regards,

Jordan

7 REPLIES 7

Prateek kumar
Mega Sage

Hello Jordan


For this requirement, all you need is a On-change client script and a Confirm scripting validation.


Client scripts


Scripting alert, info, and error messages


Let me know if you need any help with scripting



Please mark my response as correct and helpful if it helped solved your question.
-Thanks

adityaghosh
Tera Guru

you can use confirm box



please refer the following link:-



confirm box not working as expected


Is there a way to modify the script so if the user presses cancel the catalog item closes or the value inside "justification" wipes, this way the user can not submit the form.



Kind Regards,


Jordan


Hi Jordan,



You can use one of the following above the "return false" part, if you have one:


g_form.setValue('my_field', '');


or


g_form.clearValue('my_field');



If you share you script, we'll be able to comment on it.



harel