Search...
lock( )
Locks the WixComments
element.
Description
The lock()
function locks the WixComments
element, which blocks visitors from creating or editing comments. It sets the locked
property to true
.
Syntax
function lock(): void
lock Parameters
This function does not take any parameters.
Returns
This function does not return anything.
Return Type:
void
Was this helpful?
Lock the comments widget
Copy Code
1$w("#myCommentsWidget").lock();
Toggle an element's locked state
Copy Code
1if ($w("#myCommentsWidget").locked) {2 $w("#myCommentsWidget").unlock();3 } else {4 $w("#myCommentsWidget").lock();5 }