Git Product home page Git Product logo

Comments (3)

laurabennett avatar laurabennett commented on September 24, 2024

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.

rynpsc avatar rynpsc commented on September 24, 2024

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.

laurabennett avatar laurabennett commented on September 24, 2024

from craft-phone-number.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.