Comments (9)
Thank you for the report, not sure how I missed ever testing the field as required!
This issue should be resolved.
from acf-website-field.
Thank you for your responsiveness. When I saw this error message at the beginning, I thought it was due to the url I set. But it was a correct format. Is it possible to not register the field if it's a wrong url instead of displaying a message on the front ?
from acf-website-field.
Can you link a URL with the error message? I thought I disabled the front end error message.
from acf-website-field.
Ah, tested and I see what you are referring to. The Invalid URL on the front end.
I am not sure that is a better solution, if someone puts in a bad url and nothing displays on the front end, wouldn't that be confusing? Trying to think of another option.
I don't want to add ajax to the admin to validate the url, so the front end was the only place I could think of.
from acf-website-field.
Is there a way to use your function for cleaning the url before register it in database ?
I mean before the admin save the post ?
I tried when I looked at your code but I failed ^^'
from acf-website-field.
Can you post a URL that is causing an issue and I can run some validation tests.
ACF has a function to change a field value before it gets saved to the database...
function update_value($value, $post_id, $field)
{
// Note: This function can be removed if not used
return $value;
}
But would like to run some tests before I mess with that.
from acf-website-field.
It was just an idea to optimize your plugin. I think it's better for the user experience to display an error message in the back office when the admin try to save his post with a wrong url.
from acf-website-field.
I think its a good idea, sometimes I get nervous adding ajax/jquery to the admin though.
Can you add a URL that was giving you an issue and I will run some tests to see how to add the feature.
Thanks Aguidis.
from acf-website-field.
I simply tried the value 'test'. So in back office my post was updated and in my page I could read "bad url". At this moment, I was wondering if I could change the code in order to call a function when my post is about to be updated. In order to check the field's value. But I'm not totaly comfortable with with the hook so I failed like I said ^^
from acf-website-field.
Related Issues (20)
- Internal Link HOT 1
- 'http://' is not attached, if an array is returned HOT 3
- Website Field Value not showing with wp_insert_post + update_post_meta HOT 1
- External link not working when placed on images HOT 2
- How has the code look like?
- Possible to add input validation HOT 4
- Any way to use relative links (by not adding http)? HOT 2
- Just a URL output... HOT 4
- HTTPS support HOT 2
- Repeater Output HOT 1
- ACF 5.0 upgrade - plugin not working HOT 3
- External Link not working HOT 1
- Tagging HOT 1
- No options in 5.1 HOT 1
- Current windows HOT 1
- URL Validation HOT 1
- Required is not working
- Screen shots HOT 1
- field is not operating as a link, it is behaving like a text field - anyone else had this issue? I'm using ACF 4. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from acf-website-field.