CaptchaBundle icon indicating copy to clipboard operation
CaptchaBundle copied to clipboard

Read/get the image url in CaptchaBundle

Open engharb opened this issue 8 years ago • 0 comments

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

engharb avatar Dec 18 '17 11:12 engharb