Message Boards Message Boards

Use StandardForm in Cloud FormFunctions?


Cross posted on Mathematica.stackexchange


choices = {
   "label 1"                     -> 1
  , Column[{"label", 2}]         -> 2
  , Framed[3]                    -> 3
  , HoldForm @ Sum[i, {i, 0, ∞}] -> 4

CloudDeploy @ FormFunction[
 { "a" -> <|
     "Interpreter" -> choices
   , "Control" -> (RadioButtonBar[##, Appearance -> "Vertical"] &)|>

enter image description here

So by default StandardForm is not supported (though e.g. Column is).

My attempts to fix it

I tried to force "HTMLCloudCDF" as an export form for those elements:

"Interpreter" -> MapAt[ExportForm[#, "HTMLCloudCDF"] &, choices, {All, 1}]

enter image description here

But it is not supported.

At the end I am using: ExportForm[#, "SVG"] & but it makes fonts inconsistent with the rest of the form and selected item's label gets an ugly red frame if it is an image:

enter image description here


How to use arbitrary expressions in form functions layout? Is there a better way than SVG? Shouldn't it work out of the box?


POSTED BY: Kuba Podkalicki
3 months ago

Group Abstract Group Abstract