0
$\begingroup$

Someone knows why to I need to use /.Return -> Identity in the code below?

FormPage[
    "code" -> "String"
    , Module[{},
        If[#code!="123", Return["wrong code:" <>#code ]];
        "your code is right: "<>#code

    ]/.Return -> Identity &
]

If I didn't add this, I get Return in the output.

enter image description here

Is this a Bug in FormPage / FormFunction ?

$\endgroup$
2
  • 2
    $\begingroup$ I suspect it is equally likely to be a problem in the design of Return. Suggestion: Try using Return[...,Module] and see if that improves matters. $\endgroup$ Mar 21, 2021 at 15:41
  • $\begingroup$ Yes, Return[...,Module] solves! Tks Daniel. It seems like a bug so. $\endgroup$
    – Murta
    Mar 21, 2021 at 16:53

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.