antpre Posted September 6, 2015 Share Posted September 6, 2015 Hy there, I have a form that I want to use to edit pages in the front end. I have a field that has an asmselect inputfield in the backend and I would like to display it with that same asmselect inputfield in this form on the front end. But it displays a standard mutli-select field. I fail to get the asmselect to show up in this form. I use a snipet of code found on the forum to create the form. It render the fields with the proper html tags (for instance this field has the <div class='InputfieldAsmSelect'>). I understood that their is a need to load specific css and js files to make it work. I tried to include some of the js and css included in the asmselect module. not working.Could some body tell me which is the correct way to do this.Thanks Link to comment Share on other sites More sharing options...
Macrura Posted September 7, 2015 Share Posted September 7, 2015 are you using the api to generate your form, or manually coding it? Link to comment Share on other sites More sharing options...
antpre Posted September 7, 2015 Author Share Posted September 7, 2015 hi, Still quite new to processwire so there may be things I am not fully understanding. 1) Yes the form is build using the API. I used the code from on this post https://processwire.com/talk/topic/59-module-want-form-builder/page-4#entry11639 2) the markup seems to be ok to me <li class='Inputfield InputfieldPage Inputfield_ref_tag ui-widget InputfieldNoFocus' id='wrap_Inputfield_ref_tag'> <label class='InputfieldHeader ui-widget-header' for='Inputfield_ref_tag'>ref_tag<i class='toggle-icon fa fa-angle-down' data-to='fa-angle-down fa-angle-right'></i></label> <div class='InputfieldContent ui-widget-content'> <div class='InputfieldAsmSelect'> <select id="Inputfield_ref_tag" name="ref_tag[]" multiple="multiple"> <option value='1022'>tag1</option> <option value='1023'>tag2</option> </select> 3) I have added a bunch of js and css file taken from the admin template and from asmselect module try to make it work. Here is the list : InputfieldAsmSelect.css , jquery.asmselect.css , JqueryUI.css , inputfields.css , InputfieldAsmSelect.js , inputfields.js , jquery.asmselect.js ,JqueryUI.js thanks for your help Link to comment Share on other sites More sharing options...
Macrura Posted September 8, 2015 Share Posted September 8, 2015 Perhaps a quick way to troubleshoot would be to look at a formbuilder form, an example of which is the showcase submission form (categories field). Looking at the source code of that might possibly reveal any dependencies; Also that may be running in an iframe, which is the default embed method for FB. Link to comment Share on other sites More sharing options...
antpre Posted September 8, 2015 Author Share Posted September 8, 2015 Thanks for your hint.I looked into fredy module which is use to display edit form on the front end. I didn't have much time so I did a bulk copy/paste of all the css and js files included and it worked.I will take time to clean that to keep only the need css and js file for the asmselect field and I will report it back here. So that if anyone needs this information in the future...Thanks 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now