Open Closed

How Can I create a public form via link? #3910


User avatar
0
ramazan created

Hello There,

I want to a create form for exam. We need to unauthorized users to fill this form via link. How can I do that?

Thanks

Turkish translate is here:

Merhaba, Forms ları sınav olarak kullanmak istiyoruz. Fakat sınava girecek kişiler giriş yapmayacaklar. Link üzerinden hazırladığımız formu nasıl paylaşabiliriz?

Teşekkürler

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v6.0.0
  • UI type / MVC /
  • DB provider: EF Core /
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

10 Answer(s)
  • User Avatar
    1
    malik.masis created

    Hi Ramazan,

    As far as I understand, if you don't set the auth configuration in the ABP Framework, you can already access it with unauthorized users. However, if you want to specify it for some actions, you can use [AllowAnonymous] as an annotation.

    There are also 2 documents that may assist you with that. anonymous-user and auth

    Regards

  • User Avatar
    0
    ramazan created

    Hello,

    I Understand you but you can not understand me. :) I use forms module written by abp. When I write [allowanonymous] attribute?

    Turkish.

    Merhaba,

    Anlıyorum fakat siz beni anlamadınız :) Forms modülünden bahsetmiştim. Abptarafınızdan yazıldı. [allowanonymous] yazabileceğim bir form yok. Kütüphanenin içinde olduğu için herhangi bir işlem yapamıyorum.

  • User Avatar
    0
    malik.masis created

    Hi Ramazan,

    Sorry, it's my mistake. I now have a better understanding. In ABP Framework, almost all methods and actions are virtual, and you can override them easily by inheritance. Then just mark this action or method as [AllowAnonymous]

    I believe this documentation will inspire you.

    Regards

  • User Avatar
    0
    ramazan created

    Hi Malik,

    Its not a problem. But I did not fully understand you. Which method will I override in the link https://localhost:44383/Forms/aad4b84f-8fbe-b824-89f6-3a07079d162e/ViewForm? Where should I write? For example: To the Application layer? Which class will I inherit? Which method do I override?

  • User Avatar
    0
    malik.masis created

    Hi Ramazan,

    It depends on your code and requirements hence I sent you the above documentation. Seems like, you should override FormAppService in the application layer what you need them. Also, there is authentication in FormController hence you also should override that.

    Regards.

  • User Avatar
    0
    ramazan created

    Hello Malik,

    "Log in" in the Forms module. I found a checkbox setting called But when I disabled this checkbox, I saw that the problem was not resolved. I think there is a problem with this part in the Forms module. I am using the trial version of abp.io commercial. It is disappointing for me to encounter these and similar problems.

  • User Avatar
    0
    ramazan created

    Actually what I did is very simple.

    1. Create a new mvc project.
    2. Add Forms from Modules to your project.
    3. Run the project and create a form.
    4. Create a link in the form you created with the "Submit" button.
    5. Test this link on a different browser (not logged in).
  • User Avatar
    0
    ramazan created

    you can see error like attached file.

  • User Avatar
    0
    malik.masis created

    Hi Ramazan,

    Sorry, I couldn't reproduce your case

    I've created 2 questions with Requires login and without it. There is no error in both cases.

    It's my private session

    Regards

  • User Avatar
    0
    ramazan created

    Hello Malik,

    i tried before. But this doesn't solve my situation. and I left.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09