Customize prefilled url field

hello! so i’m looking to customize a prefilled URL field for a user input form, how would i make the “[slug]” part in the URL change according to the results from the query?

Another question I have is customized messages/sentences according to the profile a user is on. For example, if I was on “Sam’s profile” there would be a sentence/message saying “Welcome to Sam’s profile” so it would be like “Welcome to ________'s profile”. I’m using wix’s own member api/app for reference.

Any help is appreciated, thank you!

You can use the slug variable in a template literal . Something like this:

let slug - results.items[0].slug;
let profiler = `https://wixsite.snoodlet.ferazon/profile/${slug}`;

To get the current user’s name, you will need to use the backend getUser() function. In any case, using the backend is recommended for privacy and security issues.

awesome! thank you