• Resolved Andreas

    (@agermann)


    Hi,

    I want to use a CFF to show a certain picture after typing a certain picture ID. The user shall type the ID of the picture he wants (“ABC12345”) and after pressing a button he sees the picture with the URL “https://domain.com/wp-content/upload/eventid/ABC12345.jpg”

    I have the input field 1 for the ID, a calculated field 2 in which the URL is generated with field 2 set equation: ”https://domain.com/wp-content/upload/eventid/” + fieldname1 + “.jpg” and that looks fine in the calculated field.

    And a button (calculate) with the onclick event: redirectToURL(fieldname2).

    But this doesn’t work. Nothing happens. I guess I made a stupid mistake and I tried a lot of variations but nothing does work. It does work when I take the complete path (redirectToURL(”https://domain.com/wp-content/upload/eventid/ABC12345.jpg”) for the onclick event.

    Perhaps there is somebody who can help me? Thanks in advance

    • This topic was modified 2 weeks, 6 days ago by Andreas.
    • This topic was modified 2 weeks, 6 days ago by Andreas.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author CodePeople2

    (@codepeople2)

    Hello @agermann

    Edit the onclick event as follows:

    redirectToURL(getField('fieldname2').val(true, true));

    You cannot access the fields values directly by their names outside the equations contexts.

    Best regards.

    Thread Starter Andreas

    (@agermann)

    Thanks a lot! It works.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.