Comments (3)
I did get it to work but having trouble with the CSS from the Asset bundle overwriting my css.
{% do view.registerAssetBundle("rynpsc\phonenumber\assets\PhoneNumberAsset") %}
<div class="pageoverflow">
<label class="pagetext">Phone</label>
{{ hiddenInput('fields[phone][region]', 'US') }}
<input type="tel" id="fields-phone-number" class="pageinput" name="fields[phone][number]" value="{{ member.phone }}">
</div>
from craft-phone-number.
Sorry for not getting back sooner but looks like you've got it all figured out!
In terms of the CSS, the asset bundle isn't designed for use on the frontend. That said I'm not sure why it would be overwriting your css as all of the plugins css is scoped to rynpsc-phonenumber. The compiled css can be seen here https://github.com/rynpsc/craft-phone-number/blob/master/src/assets/dist/styles/main.css.
I'm going to close this issue as neither Craft or Craft plugin Asset bundles are designed for use on the frontend as the styles are all made to fit in within the control panel styles so would always conflict on the frontend.
I'll make a note to update the docs for future users trying to save fields on the frontend.
Thanks for using the plugin.
from craft-phone-number.
from craft-phone-number.
Related Issues (12)
- JSON Decode error after migrating from plain text field HOT 2
- Field doesn't save when creating/publishing new entry HOT 2
- Link and format with single function HOT 3
- getCountryCode() and getRegionCode() are mixed up
- Craft 4 500 error HOT 3
- Feed Me support HOT 3
- Incorrect href when using `tel` Twig filter HOT 2
- Search field value? HOT 2
- Incorrect Failed Area Code Validation HOT 3
- Mapping error when using feedme HOT 1
- Model validation rules HOT 3
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 craft-phone-number.