On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • Hi,

    I try to use Jot as a kind of contact board.
    So people should enter their name, e-mail and a short text and they have to choose between two options.

    My problem is: how to manage, that people can for example tip a radio button on Jot an the comments.html gives out what was ticked.

    Here is what I was trying so far:

    I found this:
    http://www.partout.info/gaestebuch_modx.html
    That’s an introduction for an guestbook (it’s German).

    There I’ve cut the select-list out and left only two options to choose (radio buttons would be much better - but I haven’t any clou how to get them with Jot).

    I but a new custom field called "ort" - and put it into the snippet-call.

    I put something like this in the form:
    looks like this
    <label for="ort[+jot.id+]">Ort:</label>
    <select tabindex="[+jot.seed:math=`?+3`+]" name="ort" id="ort[+jot.id+]" size="2">
    <option value="1">one or</option>
    <option value="2">another</option>
    </select>


    With the plan to let PHx find out wheather "ort" ist "1" or "2" and put out text.

    Later I changed it to:
    <label for="ort[+jot.id+]">Ort:</label>
    <select tabindex="[+jot.seed:math=`?+3`+]" name="ort" id="ort[+jot.id+]" size="2">
    <option value="[+form.field.custom.vote:esc+]">one or</option>
    <option value="[+form.field.custom.vote:esc+]">another</option>
    </select>


    and hoped, that
    [+comment.custom.ort+]
    bring out "one or" or "another"

    but - neight the one nor the other version mad anything good.

    What do you think - is my problem that Jot can’t do radiobuttons or something - do I have to less clou about Jot oder about forms?

    Would be glad about advices - can’t image, that modx can’t do that - cause modx can everything (so far...).


    • Found the solution in the German forum:

      http://www.modxcms.de/forum/comments.php?DiscussionID=324&page=1#Comment_19405

      Have to write it like:
      value="[+form.field.custom.anything+]valueitshouldhave"
      • Hi,

        new problem:

        I would like to valdidate the radiobuttons. People should have to tick one of them (without have one checked in the beginning).

        Tried it that way:
        [[Jot? &customfields=`ort,name,email` &validate=`name:name missing,ort:ort missing,content:content missing`]]

        -> name and content are validated like they should - but "ort", the radiobuttons, aren’t.
        Do I have to give it a special validate rule?!


        • Would you be so kind as to show me how to add a dropdown list <select> element to a jot form?