Search...
getCustomText( )
Gets the values of a product's custom text fields.
Description
This function is currently only available for Wix Studio sites.
The getCustomText()
function returns a Promise that is resolved when the values of a product's custom text fields are
retrieved.
Syntax
function getCustomText(): Promise<Array<string>>
getCustomText Parameters
This function does not take any parameters.
Returns
Fulfilled - Custom text field values.
Return Type:
Promise<Array<string>>
Was this helpful?
Get the product's custom text field values
Copy Code
1$w('#myProductPage').getCustomText()2 .then((customShirtText) => {3 let FrontOfShirtText = customShirtText[0]; // 'Hello'4 let BackOfShirtText = customShirtText[1]; // 'World'5 })6 .catch((error) => {7 console.error(error);8 });