We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello everybody, i'm a french junior dev on apostrophecms3. Here is my problem : I have a customer module with a favorites field :
favorites: { label: 'apostrophe:favorites', type: 'array', titleField: 'favorite', fields: { add: { type: { type: 'string', label: 'apostrophe:favoriteType', }, id: { type: 'string', label: 'apostrophe:favoriteId', }, } } },
I would like to add a new favorite for this customer by clicking a button on the article page.
But i can't find the way to do it in my index.js front file.
Here is a part of my code :
favorite.addEventListener('click', () => {
addFavorite(favorite.id) // favorite.id is defined })
async function addFavorite(favoriteId) {
const customerId = sessionStorage.getItem('aposCustomerId') try { ???? what's going on here ???? } catch (err) { console.error(err) } finally { } }
Thanks a lot for your help !
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello everybody, i'm a french junior dev on apostrophecms3.
Here is my problem :
I have a customer module with a favorites field :
favorites: {
label: 'apostrophe:favorites',
type: 'array',
titleField: 'favorite',
fields: {
add: {
type: {
type: 'string',
label: 'apostrophe:favoriteType',
},
id: {
type: 'string',
label: 'apostrophe:favoriteId',
},
}
}
},
I would like to add a new favorite for this customer by clicking a button on the article page.
But i can't find the way to do it in my index.js front file.
Here is a part of my code :
favorite.addEventListener('click', () => {
async function addFavorite(favoriteId) {
Thanks a lot for your help !
The text was updated successfully, but these errors were encountered: