Yep, the previous problem was caused by maildrop.cc. Who would know? I used that service in the past and it worked without any problems. Continued testing and here are some notes:
- The subject of the email I received states "Admin Init - 238". It would be great to write something more intuitive.
- I thought that once the creator clicks the activation link, all users specified in the invites field will automatically receive email invitations with the survey links (at least that how it works in traditional online survey systems). But you actually send the poll invitation link that has to be sent directly to the respondent by the survey initiator. When I click the link the system asks for the authentication. I had to copy-paste the respondent address email again, and only then the respondent receives the invitation email. If you worried that people will use your system for spamming, ask for the survey creation fee (like, 100XLM) to prevent potential bad actors from exploiting it.
- When I finally got to the next step, the website returned the following error:
Fatal error: Uncaught ArgumentCountError:
Too few arguments to function p_election_voter_options(), 2 passed in /var/www/blueorion.cc/public_html/index_election.php on line 88 and exactly 3 expected in /var/www/blueorion.cc/php/p_election.php:354
Stack trace:
#0 /var/www/blueorion.cc/public_html/index_election.php(88): p_election_voter_options(Array, '<!DOCTYPE html>...')
#1 {main} thrown in /var/www/blueorion.cc/php/p_election.php on line 354
(the link itself: https://blueorion.cc/elvote-238-bIO1qj2e9Tdn5S3lYEhKy7QN6mL2Sw9nZUmaC6p8rEi4V7Yupo0VgfPjkATbMtDs)
Also, I checked the screenshot and the link on the block explorer. The voting progress and results are recorded using custom token, that's very cool! It potentially allows using poll results in smart contracts logic. This a core building block for DAOs and governance. At the moment I don't fully understand where those tokens lend in the end, so looking forward to continue testing once you fix the issue with the server.
One more suggestion regarding results. I assume that you write aggregated results in a file upon survey competition and save them on your server. This is not really decentralized or durable, since your server can go offline or switch to some other protocol in the future. How about query and show all results on the fly when a user visits the survey info page? Everything is stored on the ledger, so you can fetch all transactions and aggregate results using js on the client side. This sounds like a more "trustless approach"; the results calculation logic doesn't depend on your backend in this case.
Re: open voting – you can list all on-going surveys on the website, but invite users into the poll by sending survey tokens to their accounts when they click a "participate" button. Alternatively, you can also check additional preconditions before sending tokens and allow only specific users based on the survey participation criteria (e.g. only accounts older than one year, or accounts with at least 100 EURT, or only accounts holding Reddit photon tokens).