print to pdf - maintaining skip logic?

110 views
Skip to first unread message

Che Geiser

unread,
Apr 27, 2016, 12:04:13 PM4/27/16
to enketo-users
I know it doesn't currently work to print to PDF with the skip logic intact (i.e. if skip logic dictates a field is skipped then it doesn't print). Any thoughts on where to start in the code to add this functionality? I'd like to look into it but don't know where to start.

Thanks,
Che

Martijn van de Rijdt

unread,
Apr 27, 2016, 4:22:27 PM4/27/16
to enketo...@googlegroups.com
Hi Che,

This is done in CSS. Removing or overwriting this rule may have the desired effect.

Cheers,
Martijn

--
You received this message because you are subscribed to the Google Groups "enketo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to enketo-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
Revolutionizing data collection since 2012.

Enketo    |    LinkedIn    |    GitHub    |    Twitter    |    Blog

Che Geiser

unread,
Apr 27, 2016, 6:08:13 PM4/27/16
to enketo...@googlegroups.com
Hi Martijn,

First I tried editing the theme-kobo.print.css and theme-grid.print.css (my form uses the grid theme, but default on my server is the kobo theme) on my enketo-express server in the /public/css folder. This seemed to have no effect. Then I also edited the theme-plain.print.css and the theme-formhub.pring.css, still no effect.

Should I be restarting the server or enketo service in order to get changes to take effect?

Thank you,
Che


--
You received this message because you are subscribed to a topic in the Google Groups "enketo-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/enketo-users/wnOF_bZ7uh8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to enketo-users...@googlegroups.com.

Martijn van de Rijdt

unread,
Apr 27, 2016, 6:10:17 PM4/27/16
to enketo...@googlegroups.com
Ah sorry, don't edit CSS files. They are frequently rebuilt with grunt which removes all your edits. You should edit .scss files and afterwards run grunt to create new css files. That should be all, I think.

Che Geiser

unread,
Apr 27, 2016, 6:17:13 PM4/27/16
to enketo...@googlegroups.com
The _print.scss does not have the code: input[type="file"] { // still let it take up space visibility: hidden; }

I've attached the file pulled from /home/enketo/enketo-express/node_modules/enketo-core/src/sass/grid


_print.scss

Che Geiser

unread,
Apr 27, 2016, 6:28:28 PM4/27/16
to enketo...@googlegroups.com
Ok, I found _print.scss in /home/enketo/enketo-express/node_modules/enketo-core/src/sass/core and that did have the code you referenced.

I ran grunt, without errors.

It does not seem to have made a change. I also tried rebooting the server, also no effect.

Martijn van de Rijdt

unread,
Apr 27, 2016, 6:31:42 PM4/27/16
to enketo...@googlegroups.com
Ok, sorry to hear that. I don't think I can help further, without actually implementing it myself.

Che Geiser

unread,
Apr 27, 2016, 6:32:05 PM4/27/16
to enketo...@googlegroups.com
Ok, Thanks for trying!

Jesús Borruel

unread,
Apr 17, 2020, 11:03:13 AM4/17/20
to enketo-users
I am also interested in this, did you ever succeed in not grey-printing the skipping parts? I know it's been a long ago, but just in case...

Thanks!

Ok, Thanks for trying!

To unsubscribe from this group and stop receiving emails from it, send an email to enketo...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

-- 
Revolutionizing data collection since 2012.

Enketo    |    LinkedIn    |    GitHub    |    Twitter    |    Blog

--
You received this message because you are subscribed to a topic in the Google Groups "enketo-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/enketo-users/wnOF_bZ7uh8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to enketo...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "enketo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to enketo...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

-- 
Revolutionizing data collection since 2012.

Enketo    |    LinkedIn    |    GitHub    |    Twitter    |    Blog

--
You received this message because you are subscribed to a topic in the Google Groups "enketo-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/enketo-users/wnOF_bZ7uh8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to enketo...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "enketo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to enketo...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

-- 
Revolutionizing data collection since 2012.

Enketo    |    LinkedIn    |    GitHub    |    Twitter    |    Blog

--
You received this message because you are subscribed to a topic in the Google Groups "enketo-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/enketo-users/wnOF_bZ7uh8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to enketo...@googlegroups.com.

Che Geiser

unread,
Apr 17, 2020, 11:12:42 AM4/17/20
to enketo...@googlegroups.com
I never solved that issue. 

To unsubscribe from this group and all its topics, send an email to enketo-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/enketo-users/8db10582-85b0-4d91-8d5a-73d09c7f54b6%40googlegroups.com.

Martijn van de Rijdt

unread,
Apr 17, 2020, 11:41:02 AM4/17/20
to enketo...@googlegroups.com
Hi Jesús (and Che),

At some point in the last few years, we have expanded the print functionality and we now even have API endpoints that create a PDF directly (though I am not sure if anybody is using those yet). The logic we are using for all printing to determine whether to show skipped-with-skip-logic fields, is that if the form was loaded with an existing record skipped fields are not included and otherwise they are included (in a lighter color). The idea is that the empty forms can this way be used for manual data collection with paper and pencil.

I'm guessing your use case is:

1. filling out an empty form
2. printing to PDF before submitting

Is that correct? 

If the form/data server (KoBo, Ona, ODK Central?) included a feature that allowed you to download a PDF of a submitted record (without showing skipped fields), would that meet your requirements? If so, I would recommend lobbying the form/data server of your choice to leverage this Enketo feature, because it's all ready and works well!

Thanks in advance for helping us understand your requirements!

Martijn

To unsubscribe from this group and stop receiving emails from it, send an email to enketo-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/enketo-users/CAPdZeqYuoKXM9-q9OVPb8DkNdqFC7un7M94g9AUq_hEnp1jhrA%40mail.gmail.com.


--
Pushing data since 2012.

Enketo    |    LinkedIn    |    GitHub    |    Twitter    |    Blog

Jesús Borruel

unread,
Apr 17, 2020, 12:12:00 PM4/17/20
to enketo...@googlegroups.com
Wow !!! 

Thanks so much for such an accurate and prompt answer!!! This functionality rocks!! Yes, I was actually trying to print before submitting...

It was hard to understand the logic behind it, but now it all makes sense. It is right what I needed!

Thanks so much! Best regards

Jesús B.



Reply all
Reply to author
Forward
0 new messages