Hi Ron,
sounds more like before insert hook, please look into wix code reference documentation.
if you need any specific help with syntax please share your code as reference
thanks,
Shlomi
Hi Ron,
sounds more like before insert hook, please look into wix code reference documentation.
if you need any specific help with syntax please share your code as reference
thanks,
Shlomi
For this one I have no idea… I have read API, I always read API before asking. What I tried is the same code of the update function with input values in the page. But it make no sense for a hook… Then I tried the exemple the API to try to understand!
About before Insert, I’m not sure ! Maybe… probably! But for coding it I’m totally lost… Sorry
I tried this following code, but of course, it doesn’t perform what I want! Please help me on this one for coding it, I’m really not confident!
export function MATCH_SUMMARY_afterInsert(item, context) {
let hookContext = context; // see below
// some change to the received item
item.hteamName = toUpperFirst(item.hteamName);
item.gteamName = toUpperFirst(item.gteamName);
return item;
}
// How to define toUpperfirst ? to copy previous fields values to the New insert field ???
function toUpperFirst(s) {
return s.charAt(0).toUpperCase() + s.slice(1);
}
Thanks!
sounds more like before insert hook, please look into wix code reference documentation about before insert hook.
about the toUpper, it is like you’d do in any javascript, use log.console to debug, there are also many examples in the web ![]()
Shlomi
Hi… I don’t understand why some of WIX users have luxury of turnkey coding help but for me I have always to learn and find out by my own my line codes according my needs… Fir this one I’m really lost Sorry! If you decide to tell me for the first time how to perform this, I will be really grateful!