scrappydoo
Forum Replies Created
-
”Simple History logs actions within WordPress but should not track direct FTP activity. When I created the admin user via FTP, WordPress recognized it upon login, which is why the plugin logged the user creation and role change.”
Please could you verify if the above is plausible, sent to me by the support member who apparently created the new user via FTP and then changed it to admin.
He seems to be saying that after creating the new user via FTP and then logging in for the first time, Simple History recognised that a new user had been created and logged this.
Thanks Paer
Anyone? Would the plugin provider be able to comment maybe?
// Wait for the DOM to load before adding event listeners
document.addEventListener("DOMContentLoaded", function() {
// Get the submit button using its class
var submitButton = document.querySelector('.forminator-button-submit');
// Add a click event listener to the submit button
submitButton.addEventListener('click', function(event) {
// Get the text field by its name (postdata-1-post-title)
var textField = document.querySelector('input[name="postdata-1-post-title"]');
// Get the form element
var form = document.getElementById('forminator-module-2246');
// Check if the text field value is greater than or equal to 400 characters
if (textField.value.length >= 400) {
// Prevent the form from submitting
event.preventDefault();
// Find and remove any existing error message
var existingErrorMessage = form.querySelector('.error-message');
if (existingErrorMessage) {
existingErrorMessage.remove();
}
// Create a new error message element
var errorMessage = document.createElement('div');
errorMessage.classList.add('error-message'); // You can style this class later
errorMessage.style.color = 'red';
errorMessage.textContent = 'Error: The text must be less than 400 characters!';
// Append the error message to the form
form.appendChild(errorMessage);
}
});
});I managed to do it with JavaScript. If the user enters more than “x” amount of characters it gives an error and doesn’t allow the form to submit.
Hi Nithin,
Sorry I wasn’t clear, it’s the “content” and/or “title” fields where I want to limit the character length to e.g. 200 characters.
Hi @tinocalvo,
Added the code snippet but didn’t have any effect unfortunately. As above, I am the logged in user and I’m looking at my own profile. Under the name on my profile page it says “30 blog posts” and “40 activity posts”. In the widget right next to this, it says “30 blog posts” and “30 activity posts”. Under user earnings it correctly shows “30 activity posts” and “40 blog posts”. Where do I go from here?
Thanks Tino and yes correct I am using BuddyBoss. I will try the snippet you linked to, sounds like it might address the problem. Just to point out that the profile I’m viewing is my own when I’m logged in, so presumably the totals should be the same?
- This reply was modified 5 months, 2 weeks ago by scrappydoo.