Message Boards Message Boards

GROUPS:

Use StandardForm in Cloud FormFunctions?

Posted 1 year ago
885 Views
|
0 Replies
|
0 Total Likes
|

Cross posted on Mathematica.stackexchange

Example

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

Question

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

Related

https://mathematica.stackexchange.com/q/123894/5478

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract