Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read/get the image url in CaptchaBundle #181

Open
engharb opened this issue Dec 18, 2017 · 0 comments
Open

Read/get the image url in CaptchaBundle #181

engharb opened this issue Dec 18, 2017 · 0 comments

Comments

@engharb
Copy link

engharb commented Dec 18, 2017

I have added

->add('captcha', CaptchaType::class, array(
'as_url' => true,
'keep_value' => true,
'background_color' => array(255,255,255),
'width' => 200,
'height' => 50,
'length' => 5,
'label' => false,
'required' => true,
'label_attr' => array('class' => 'control-label'),
'attr' => array('class' => 'form-control', 'size' => 20, 'maxlength' => 6, 'style' => 'margin-bottom: 1em; margin-top: 1em;'),
))

into my form builder, but I can not load the image because I dont know the right URL that should be supported to my template/form.

Here is my front-end page:

">
            <div class="col-md-8">
               
                <img border="0" style="margin-bottom: 0.2em" title="captcha" alt="Captcha"
                     src="??????"/><br/>

                <?php echo $view['form']->row($form['captchaid']) ?>
                <?php echo $view['form']->widget($form['captcha']) ?>
                <?php echo $view['form']->errors($form['captcha']) ?>
            </div>
            <br/><br/>
        </div>

My question how to load/find the image url where my routing.yml:

gregwar_captcha_routing:
resource: "@GregwarCaptchaBundle/Resources/config/routing/routing.yml"
prefix: /_gcb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant