ukyo Posted February 27, 2018 Posted February 27, 2018 InputfieldHelper for ProcessWire v3 Module Directory - Github repo This module extends base `ModuleConfig` class add some features to this class. This module creates Inputfields from array configs. I used this module for create module configuration panel for WirePHPMailer module. You can see configs here. Also you can use this module for create forms from array.You can check github repo for usage.
bernhard Posted February 27, 2018 Posted February 27, 2018 hi @ukyo thanks for the phpmailer module - I've built one my own since I was not happy with the other options, but it was not polished enough to release it I'm not sure, though, what is the difference between your inputfieldhelper and the default module config? https://processwire.com/blog/posts/new-module-configuration-options/#using-an-array-to-define-module-configuration you can also add fields to a form via array: Quote Alright… you guys that wanted arrays for defining Inputfields–I have to admit this is most definitely a good thing. So as a bonus (stepping outside module configuration for a moment), you can now use these arrays anywhere that you use Inputfields. Simply pass an array like the above to any InputfieldWrapper, InputfieldForm, or InputfieldFieldset via the add() method, and it will set it all up for you, i.e $form->add(array( ... )); 1
ukyo Posted February 27, 2018 Author Posted February 27, 2018 43 minutes ago, bernhard said: hi @ukyo thanks for the phpmailer module - I've built one my own since I was not happy with the other options, but it was not polished enough to release it I'm not sure, though, what is the difference between your inputfieldhelper and the default module config? https://processwire.com/blog/posts/new-module-configuration-options/#using-an-array-to-define-module-configuration you can also add fields to a form via array: I am using it for different cases. For modules (everything from a config file) : I am not defining default values as you see here : https://github.com/trk/WirePHPMailer/blob/master/WirePHPMailer.module#L33 Getting module configs : https://github.com/trk/WirePHPMailer/blob/master/WirePHPMailer.module#L77 Settings default values : https://github.com/trk/WirePHPMailer/blob/master/WirePHPMailer.module#L78 Merging module values with defaults, building inputfields : https://github.com/trk/WirePHPMailer/blob/master/WirePHPMailer.module#L119 - Its easy to build configurable module for me, no need to set all things on different places. For creating form you can see simple example usage on README.md I am using it for creating dynamic fields for page templates on runtime by hooking ProcessPageEdit::buildForm. In screenshots Settings and General tabs added dynamically and fields inside these tabs added by a config file. Use case change up to you. 3
fliwire Posted February 16, 2021 Posted February 16, 2021 hi : if u still support this module. can u fix this : item markup not set properly. (<div class='uk-width-1-4@m uk-margin-top'>{out}</div>) ProcessWire 3.0.165 $iHelper->markup = array( "list" => "<div class='uk-grid'>{out}</div>", "item" => "<div class='uk-width-1-4@m uk-margin-top'>{out}</div>", "InputfieldSubmit" => array( "item" => "<div class='uk-width-1-4 uk-text-right@m uk-margin-top'>{out}</div>", ) );
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