ryan Posted September 6, 2019 Share Posted September 6, 2019 This week we’ll take a look at a new version of FormBuilder that's on the way (with a screencast), as well as the latest version of the core: ProcessWire 3.0.140— https://processwire.com/blog/posts/pw-3.0.140-and-formbuilder-v40/ 27 Link to comment Share on other sites More sharing options...
3fingers Posted September 6, 2019 Share Posted September 6, 2019 Really nice additions to form builder, as an happy customer of Pro Fields I'm going to purchase Form Builder in the next future for a project I'm working on. High five to your new cat! Thanks Ryan, you are a great person. 6 Link to comment Share on other sites More sharing options...
Robin S Posted September 6, 2019 Share Posted September 6, 2019 The new FormBuilder features look very nice, thanks! Lots of questions spring to mind... 1. When using Form A within a Form B, is it possible to override any of the field settings of Form A in the context of Form B? Say, if I was using Form A inside several other forms but I needed one of the fields to be required only within Form B. 2. Is it possible to have show-if and required-if dependencies on fields within Form A that depend on the values of fields within Form B? 3. In a paginated form, are the form values submitted to the server each time Next / Back is clicked? So is each page validated independently and the user cannot move forward until the current page validates, or is all the validation done on the final submit? 4. If each page is submitted/validated independently, can a site admin see partial form submissions in Entries that are abandoned before the final submit button is clicked? 5. Or if the form is only submitted/validated after all pages are completed, how are field errors displayed if they occur on multiple different pages in the form? 6. Is it planned to have an overview navigation of the pagination using the page headings, so a user can jump directly to any previous page in form and can see how far they have progressed through the total form? 7. Do the different pages "know" about the values entered into other pages in the form, so show-if and required-if can depend on values in other pages? Probably I just need to wait until the new version is released. ? 9 1 Link to comment Share on other sites More sharing options...
cstevensjr Posted September 6, 2019 Share Posted September 6, 2019 It was really nice to see you in a video explaining things. The additional capabilities to Form Builder are remarkable. 6 Link to comment Share on other sites More sharing options...
teppo Posted September 7, 2019 Share Posted September 7, 2019 Hey Ryan! Great stuff again ? I wasn't quite sure where to post this, so asking here first: we're using Composer to set up ProcessWire, but for some reason the dev branch hasn't been updating for a while – any idea what's going on? If you take a look at https://packagist.org/packages/processwire/processwire#dev-dev you can see that the latest timestamp is 2019-08-16 18:11 UTC. 1 Link to comment Share on other sites More sharing options...
Sergio Posted September 7, 2019 Share Posted September 7, 2019 Excellent new features for FormBuilder, Ryan!! Great work! Keep doing videos, they are very informative! Thanks! 2 Link to comment Share on other sites More sharing options...
wbmnfktr Posted September 7, 2019 Share Posted September 7, 2019 Can't wait to get my hands dirty with the upcoming FormBuilder v40. But there is one thing I'm asking myself now: How about saving those re-used forms into pages? Will there be still the need for all kinds of fields for templates? Link to comment Share on other sites More sharing options...
dragan Posted September 7, 2019 Share Posted September 7, 2019 @ryan There seem to be issues with the new toggle field-type. I just upgraded to the latest PW dev, and installed toggle and placed in basic-page tpl. The setup is like this: On pages with No or Undecided the output of $page->toggle is what I would expect. However, on the page where I selected Yes: I get only an empty string with Tracy in the frontend. In the backend, when I select Yes and save the page, nothing is selected after page-reload. (there is neither Yes, No or Undecided with blue background) Link to comment Share on other sites More sharing options...
matjazp Posted September 8, 2019 Share Posted September 8, 2019 I can confirm. It looks like processInput is not executed if Yes is checked. Link to comment Share on other sites More sharing options...
ryan Posted September 8, 2019 Author Share Posted September 8, 2019 @dragan @matjazp I setup a new toggle field exactly as shown in the screenshot, but can't duplicate the issue. Maybe it's something browser specific or maybe it's getting interference from some other module? Do you see any JS errors? Any other factors you can think of? Link to comment Share on other sites More sharing options...
dragan Posted September 8, 2019 Share Posted September 8, 2019 No JS errors. Google Chrome, Windows. Also: When I previously selected No, then re-edit the page and select Yes, it sticks with No. It's the same with Firefox and IE11, btw. $config->debug = true; $config->advanced = true; Apache/2.4.39 (Win64) OpenSSL/1.0.2s PHP/7.2.11 Nothing supicious in Tracy. Link to comment Share on other sites More sharing options...
dragan Posted September 8, 2019 Share Posted September 8, 2019 OK I found the culprit: I disabled AdminOnSteroids and now toggle fields behave as they should. Link to comment Share on other sites More sharing options...
ryan Posted September 8, 2019 Author Share Posted September 8, 2019 Quote 1. When using Form A within a Form B, is it possible to override any of the field settings of Form A in the context of Form B? Say, if I was using Form A inside several other forms but I needed one of the fields to be required only within Form B. @Robin S Not yet interactively, though it is possible with hooks. Though I do plan to make it part of the "Form" field settings once the field gets more mature. Quote 2. Is it possible to have show-if and required-if dependencies on fields within Form A that depend on the values of fields within Form B? Yes. Existing dependencies in forms you integrate will continue to work, and you can also make fields in the main form be dependent upon fields within an integrated form. The field name for fields in an integrated form is "formName_fieldName" rather than just "fieldName". That's how you can integrate multiple copies of the same form, and still end up with unique field names. So if using dependencies, then you just refer to the "formName_fieldName" in your dependency. For existing dependencies in an integrated form, FormBuilder takes care of converting those for you, so that the dependency works regardless of where else the form is used. Quote 3. In a paginated form, are the form values submitted to the server each time Next / Back is clicked? So is each page validated independently and the user cannot move forward until the current page validates, or is all the validation done on the final submit? Each page is validated independently. It creates a partial entry on the server side (in the DB) and saves it on submit of every pagination. If there are errors on the pagination you submit, it will stay on that pagination until you fix them. Quote 4. If each page is submitted/validated independently, can a site admin see partial form submissions in Entries that are abandoned before the final submit button is clicked? Yes. Partial entries also have their own URL (unique query string) that can be bookmarked or returned to if someone doesn't want to complete it all in one setting or their session expires, etc. Quote 6. Is it planned to have an overview navigation of the pagination using the page headings, so a user can jump directly to any previous page in form and can see how far they have progressed through the total form? Yes, but probably not in the first version. Though this is part of the reason why it's setup so that partial entries have their own URL. The page number can be specified in the query string. Quote 7. Do the different pages "know" about the values entered into other pages in the form, so show-if and required-if can depend on values in other pages? Any pagination has access to the entire entry server side (should you want to examine anything with hooks), but the front-end/client side only knows about the current pagination. So dependencies across paginations won't work at present. If there's interest in the feature, the plan was to support it by rendering the non-present Inputfields referred to on any pagination's showIf/requiredIf values within the current pagination, but behind a hidden element. In that manner, they are technically present for the pagination's processing and front-end JS, even if not visibly present. 1 Link to comment Share on other sites More sharing options...
ryan Posted September 8, 2019 Author Share Posted September 8, 2019 @teppo I'm not sure why that is. Maybe it needs me to add a version tag to it to jog things loose? Anything else you can think of I should test or try from here? Link to comment Share on other sites More sharing options...
ryan Posted September 8, 2019 Author Share Posted September 8, 2019 Quote How about saving those re-used forms into pages? Will there be still the need for all kinds of fields for templates? @wbmnfktr I haven't worked out all the details of this part yet. But fields in an integrated form are still present when it comes to what actions can do with them. They are just renamed to have the field name that represents the "form" field as a prefix for each field in the integrated form. So anything that maps the fields in a form to something else (like a page or spreadsheet) will likely continue to work the same way that it currently does, but would have the integrated forms "opened" (for lack of a better term) so that their fields can be mapped like the others. 1 Link to comment Share on other sites More sharing options...
ryan Posted September 8, 2019 Author Share Posted September 8, 2019 Quote OK I found the culprit: I disabled AdminOnSteroids and now toggle fields behave as they should. Glad you found it. Any particular feature in that module that you found is interfering with the toggle field? Maybe it's something I can test with and work around. Link to comment Share on other sites More sharing options...
dragan Posted September 8, 2019 Share Posted September 8, 2019 @ryan No, not yet. I have only enabled a few functions. What I found strange though (perhaps just coincidence): The bottom left link "disable AoS" also stopped working as it should, i.e. I had to save module settings twice, before it was disabled. That link to disable the module has a query string parameter toggle, which is set to 1. And afaik the first toogle field-value (e.g. Yes) also has value 1. That's maybe one toggle too many :-) 1 Link to comment Share on other sites More sharing options...
ryan Posted September 8, 2019 Author Share Posted September 8, 2019 @dragan Thanks for testing it out. I don't think it's the query string, as the Toggle field doesn't work with query strings or GET var input. I'm guessing more likely is that AoS is applying some kind of customizations or JS events to radio inputs, and these are conflicting with the events that Toggle uses to make radio inputs look like toggle buttons. Why it's only affecting the "Yes" state though is strange, as I'd expect it to affect all the state, but maybe it has something to do with Yes being the first in the list of inputs, or something along those lines. Link to comment Share on other sites More sharing options...
teppo Posted September 8, 2019 Share Posted September 8, 2019 2 hours ago, ryan said: @teppo I'm not sure why that is. Maybe it needs me to add a version tag to it to jog things loose? Anything else you can think of I should test or try from here? One idea would be visiting the Packagist GUI and using the "update" feature from there, and apparently there have been cases where simply logging in can help. I'd also make sure that the webhooks are still in place and functioning properly (I guess this depends on how you've set things up between Packagist and GitHub) ? Link to comment Share on other sites More sharing options...
matjazp Posted September 8, 2019 Share Posted September 8, 2019 @ryan @dragan I can confirm the problem is in AOS. It's an easy fix for @tpr. Link to comment Share on other sites More sharing options...
szabesz Posted September 8, 2019 Share Posted September 8, 2019 9 hours ago, ryan said: Quote 4. If each page is submitted/validated independently, can a site admin see partial form submissions in Entries that are abandoned before the final submit button is clicked? Yes. Partial entries also have their own URL (unique query string) that can be bookmarked or returned to if someone doesn't want to complete it all in one setting or their session expires, etc. @ryan Will the user be notified of this possibility? I mean, it is great that using the URL the entire process can be completed later on, but if it is not evident then probably no one will use it, being unaware of this possibility. Link to comment Share on other sites More sharing options...
tpr Posted September 9, 2019 Share Posted September 9, 2019 15 hours ago, matjazp said: @ryan @dragan I can confirm the problem is in AOS. It's an easy fix for @tpr. Thanks both, it's been fixed in v2.0.20. Sorry for the inconvenience. 4 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