Closed (fixed)
Project:
Webform
Version:
8.x-5.0-rc15
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
23 Jun 2018 at 20:26 UTC
Updated:
7 Aug 2018 at 02:15 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #4
jrockowitz commentedComment #8
yzan commentedHi
I have to do what?
Comment #10
jrockowitz commentedPlease test and review the attached patch which includes a dedicated example of a computed elements with client-side calculations via Ajax (/form/example-computed-elements-ajax).
If you want to earn commit credit and help me out, please draft the change record.
Comment #11
yzan commentedI will work on it right now ...
Comment #12
yzan commentedHello ,
I do not see the correspondence between the lines to delete and those that should be added.
I try a manual patch, and can not go further without knowing if it is an anomaly.
can you enlighten me on this?
Comment #13
yzan commentedI really hope that it will work
Comment #14
jrockowitz commented@yzan You can also checkout this branch
2981370-computed-element-ajaxComment #15
yzan commentedI want to help you,
Please, give me the steps to follow to get this result as on the GIF image.
I could finally test for writing the changes.
I'm not comfortable with the codes at the moment ..
Comment #16
jrockowitz commentedTry http://simplytest.me/project/webform/8.x-5.0-rc15?patch[]=https://www.dr... and enable to Webform examples module
Comment #17
yzan commentedHello,
It works on several combinations.
you integrate it?
I will write the change record ..
Comment #18
jrockowitz commented@yzan Please mark this RTBC.
You can create change record draft with the GIF from above.
Comment #19
yzan commentedComment #21
jrockowitz commentedI tweak the change record and committed the patch.
Woot!
Comment #22
yzan commentedThe work is great.
Woot!
Comment #23
yzan commentedDo I have to use the development version in the meantime?
Comment #24
jrockowitz commentedYes, I will be tagging a new release next week.
Comment #25
yzan commentedThank you for your precious help.
Thanks to you, I discovered more about drupal ...
Comment #26
yzan commentedexample_computed_elements_ajax
Hello,
After the update, I do not see the example.
/ admin / structure / webform / manage / example_computed_elements_ajax.
One day to look for it ....
I missed a step?
cordially
Comment #27
jrockowitz commentedIf you have the webform examples module installed you have manually import the example_computed_elements_ajax webform.
Comment #28
yzan commentedHello,
I succeeded.
It is visible now in the examples.
I uninstalled webform sample, launched the update script, and then reinstalling webform sample.
I will be able to continue to advance on the forms.
Thank you for your answer.
Comment #29
yzan commentedHello,
It seems, when using keys different from a, b and c the display of the dynamic result does not work anymore.
Comment #30
jrockowitz commentedUsing number as keys might be causing the problem.
In your Twig template, you might need to change
data.1todate['1'].Can you please create an example webform, export it, and upload it here?
The latest dev release includes an 'Export' tab when building a webform.
Comment #31
yzan commentedHello,
It works.
Indeed, keys with numbers were the problem.
Numbers replaced by letters.
Thanks for the information.
do I still download an example of a webform?
Comment #32
jrockowitz commented@yzan Your issue is more related to Twig syntax then computed elements. There is no need to post any examples.
Comment #34
yzan commentedHello,
Is there a way to calculate the sum of Twigs?
I have attached a sketch and, creates an example of a web form, it is download here.
I tried to add all the twigs but did not seem to work.
A bright ideas will be welcome ...
cordially
Comment #35
yzan commentedI also include an image of what I got from webform_calaculator 2 years ago ...
Comment #36
yzan commentedComment #37
jrockowitz commentedTry using
{{ webform_token('[webform_submission:values:element_key]', webform_submission) }}instead of{{ data.element_key }}which return the calculated value.Comment #38
yzan commentedA visual example will help me to be more comfortable with the idea that you emit ...
Comment #39
jrockowitz commentedI can't be providing custom support for your specific project.
Please post your question to https://drupal.stackexchange.com/questions/tagged/webforms or https://www.drupal.org/forum
Comment #40
yzan commentedYes I understand . I just wanted to know how to try your suggestion 37.
I will follow your advice and visit the links