Assist with dynamic member profiles and code

Question:
Please be advised…I am NOT a coder. I need some direction and assistance with the following.

Product:
Wix Studio

What are you trying to achieve:
What we need is the following: We need a profile edit feature (button) linked to a custom form in Wix and the cms, which would allow the user to edit their profiles as needed, a members search box that can only be accessed via particular memberships (set to members only pages view).

What have you already tried:
We have already created the custom form with input boxes, dynamic (all) page, and dynamic (name/individual) page. I have created a lightbox for sign up (full name, email, password). I tried to duplicate the dynamic (name) page to use as the edit page but was not able to duplicate it. ??

Additional information:
Our cms is connected to the member profile page and also to the custom form.

This is all very confusing for a non-coder professional. I was also advised by Wix support that “yes” I may keep the login that is connected to the Wix members area and I could also create my own custom login feature for members to access the dynamic profiles. My hope is that this is correct and I do not need to disable the Wix default login.

I appreciate your assistance and your expertise! Thank You.

Not sure if it can be done no-code, but coding it is possible. If you don’t know code then posting it probably wont help, but see how you go.

import { authentication, currentMember } from 'wix-members-frontend';

$w.onReady(function () {
    $w("#editProfileButton").onClick(async function () {
        let member = await currentMember();
        $w("#nameInput").value = member.name;
        $w("#emailInput").value = member.email;
        // populate other fields...
    });
});

then to save the info

$w.onReady(function () {
    $w("#saveButton").onClick(async function () {
        let member = await currentMember();
        member.name = $w("#nameInput").value;
        member.email = $w("#emailInput").value;
        // update other fields...
        await member.save();
    });
});

and for the search function

$w.onReady(function () {
    $w("#searchButton").onClick(async function () {
        let members = await wixMembers.allMembers();
        let searchTerm = $w("#searchInput").value;
        let filteredMembers = members.filter(member => member.name.includes(searchTerm));
        // display filteredMembers...
    });
});
1 Like