casaraandre Posted May 23, 2016 Report Share Posted May 23, 2016 Our users place bids for contracts but we are having difficulty getting them through the registration process. We'd like to try showing the users all of the available contracts to generate interest, but then restrict their ability to actually place the bid based on where they are in the registration process (i.e. if they have completed all of their forms). We'd like to have the following occur: When a user clicks on a "View Details" html link next to a contract, they are redirected based on their @Status from their authorization. If they have not completed all of their forms, they will be directed to a page with instructors for form upload. If they have completed the forms, they continue on to see the details of the contracts. Please note that this doesn't occur on Login - we want the redirect to occur after clicking on a link within the datapage. Thanks! Casara Quote Link to comment Share on other sites More sharing options...
MayMusic Posted May 24, 2016 Report Share Posted May 24, 2016 You need to have the status field in Authentication table to know which user completed the process then have a code to write the URL based on status. Add an HTML Block and use the code below <div id="mylink"></div> <script> if ([@authfield:Status] == "Completed"){ document.getElementById('mylink').innerHTML ="http://URL"; } else { document.getElementById('mylink').innerHTML ="http://ANOTHER URL"; } </script> Quote Link to comment Share on other sites More sharing options...
casaraandre Posted June 16, 2016 Author Report Share Posted June 16, 2016 Thanks! We weren't able to make it work exactly as above, but made this script get close to what we were looking for: <div id="mylink">sometext</div> <script> if ("[@authfield:Status]" == "Active") { document.getElementById('mylink').innerHTML = "<a href=\"http://www.scheduledrelief.com/view-shift-details.html\">View details<a>"; } else { document.getElementById('mylink').innerHTML = "<a href=\"http://www.scheduledrelief.com/upload-documents.html\">Complete registration to submit bid<a>"; } </script> However, even though the test user is NOT "active", only the first row returns the "Complete registration to submit bid" results. All subsequent results are the "sometext". Any suggestions? Thanks! Quote Link to comment Share on other sites More sharing options...
MayMusic Posted June 17, 2016 Report Share Posted June 17, 2016 Oh you need to change your code to <div id="mylink[@field:UNIQUEID]">sometext</div> <script> if ("[@authfield:Status]" == "Active") { document.getElementById('mylink[@field:UNIQUEID] ').innerHTML = "<a href=\"http://www.scheduledrelief.com/view-shift-details.html\">View details<a>"; } else { document.getElementById('mylink[@field:UNIQUEID] ').innerHTML = "<a href=\"http://www.scheduledrelief.com/upload-documents.html\">Complete registration to submit bid<a>"; } </script> Select the unique identifier from picker instead of " [@field:UNIQUEID] " Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.