rixwp22
Forum Replies Created
-
Hi @cancunmanny – You are welcome!
Thank you for sharing, I’m more or less on the same boat as you, with 2 differences, I’m 39 and have a job right now, but I’m starting to build my own site to start looking for clients (Wink-wink), on anything Digital Marketing, web, graphics design, photography, audio and video editing, podcast-anything, and more.
Coming back to your question, yes! You can setup a new user that can only have certain permissions, and WP lists all the items that you can allow and deny access to. Really simple.
If you are looking for someone to help you out with your page, message me via LinkedIn, here is my link: https://mx.linkedin.com/in/ricardo-merino-almada
@cancunmanny That’s great! Glad it worked out for you. As a TIP! For the phone version, I would say consider using maybe a smaller font or you can also modify the padding and margin to fit the content better.
BTW, ChatGPT is great, but also free, I don’t think you would have to pay for it, but your call.For everyone else…
I actually had the request today to remove the country selection from the form, so I had to modify the code I used previously. This would help everyone looking to not display the country list, set a preferred country code (mine is ‘+52’ for Mexico) and also to only show the phone input field and display it at 100%.Here is the code:
// Select the input element
const inputElement = document.querySelector('.uagb-forms-phone-input');
// Hide the select element
const selectElement = document.getElementById('uagb-form-country-xxxxxxxx');
selectElement.style.display = 'none'; // Hides the select dropdown
// Set Mexico as selected
selectElement.value = '+52'; // Ensure Mexico is selected
// Set width to 100% with !important
inputElement.style.setProperty('width', '100%', 'important');Don’t forget to change the ID value for your SELECT element, that you can get using the “Inspect” option on your browser and selecting the form.
If any of you have questions, I’ll be happy to help. Enjoy!
- This reply was modified 4 months, 2 weeks ago by rixwp22.
Did you add the ID of the form in the place were i have “xxxxxxxx” in the code?
Hey everyone, I just had the same issue and came upon this post, I’m sure that maybe most of you either gave up or just used something else, but for those that are still looking for a solution, here is what I did.
I decided to spend about 30 min looking through the code for the plug-in to find myself just loosing my mind with the fact that I could not fin the list of countries, but in my years of building sites, when I cannot find the code, I just modify what I don’t like or want to change.
For this case, I decided to create JS code and add it to the bottom of the page that I have the form. The code does the following:- Finds the form using the ID
- I provide the list of allowed country codes. For me: [‘+52’, ‘+1’], I only needed Mexico and USA.
- Then, it will go through the list of all the countries listed and remove all that do not match those marked as allowed. (Don’t worry, it’s super fast and takes less than 0.1s to execute, you won’t even see it.)
- And for the user @cancunmanny, I also added a code that would change the innerHTML from “Mexico” to “MX” to keep it looking nice, and assign it as default.
Here is the code with comments:
<script>
// Select the dropdown element
const selectElement = document.getElementById('uagb-form-country-xxxxxxxx');
// Define the values to keep
const allowedValues = ['+52', '+1']; // Mexico (+52) and USA / Canada (+1)
// Loop through all options and remove those not in allowedValues
for (let i = selectElement.options.length - 1; i >= 0; i--) {
const option = selectElement.options[i];
if (!allowedValues.includes(option.value)) {
selectElement.remove(i);
}
}
// Change the inner HTML of the Mexico option to "MX +52"
const mexicoOption = Array.from(selectElement.options).find(option => option.value === '+52');
if (mexicoOption) {
mexicoOption.innerHTML = 'MX +52'; // Update the display text for Mexico
}
// Set Mexico as the default selected option
selectElement.value = '+52'; // Set Mexico as default
</script>I added this code in a HTML block at the bottom of the page. I hope this helps any one that is looking for a solution.
Ohh yeah, I did test the form of course and works perfectly. The code executes after the DOM has fully loaded.
For the Spectra guys (@mohsinbsf), please add a section on the settings page to choose what countries to display or select the default and hide if only one country is selected and just keep the 10 digit phone field visible at 100% width like the other fields. ??
If anybody has any questions, feel free to ask. Keep on rockin!
- This reply was modified 4 months, 3 weeks ago by rixwp22.