• Resolved nikki007

    (@nikki007)


    Hi..Thank you for your awesome plugin. i have a problem with the send button. it works perfectly at first and i got the emails also. but when i edit the code inorder to add one more field into the form the problem starts. now after i click on the send button nothing is happening. how can i fix this?
    i just updated contact-form.view.php by inserting the following code after name:

    <!--phone-->
     <div class="control-group form-group<?php if (isset($contact->Errors['phone'])) echo ' error has-error'; ?>">
                    <label for="cscf_phone"><?php _e('Phone:','cleanandsimple');?></label>
                    <div class="<?php echo cscf_PluginSettings::InputIcons() ? "input-group" : ""; ?>">
                        <?php if ( cscf_PluginSettings::InputIcons() == true ) { ?>
                            <span class="input-group-addon"><span class="glyphicon glyphicon-user"></span></span>
                        <?php } ?>
                        <input class="form-control input-xlarge"
                           data-rule-required="true"
                           data-msg-required="<?php _e('Please give your phone number.','cleanandsimple');?>"
                           type="text" id="cscf_phone" name="cscf[phone]"
                           value="<?php echo $contact->Phone; ?>"
                           placeholder="<?php _e('Your Phone Number','cleanandsimple');?>"
                        />
                    </div>
                   <span for="cscf_phone" class="help-inline help-block error" style="display:<?php echo isset($contact->Errors['phone']) ? 'block' : 'none'; ?>;">
                        <?php if (isset($contact->Errors['phone'])) echo $contact->Errors['phone']; ?>
                    </span>
                </div>

    and inserted this line in class.cscf_contact.php

    //phone
    	if (strlen($this->Phone) == 0) $this->Errors['phone'] = __('Please give your phone number.','cleanandsimple');
Viewing 3 replies - 1 through 3 (of 3 total)
  • The reason the form now fails to submit is because the backend php code for the plugin is broken ($this->Phone does not exist). In order to add a new field you need to do more than update the view.

    Obviously you are free to make whatever changes you want to, but help with changing it is beyond the level of support that I can give you.

    Sorry I can’t be of more help but I’m sure you will appreciate that this plugin is supplied ‘as is’ and support can only be given for the version that was issued by me.

    Thread Starter nikki007

    (@nikki007)

    Excuse me..what do u mean by “support can only be given for the version that was issued by me” ?? i downloaded the plugin from this thread and the plugin author specified in it is you.

    Please note that this is a simple contact form plugin that works straight out of the box. It can be customised, but it does not currently allow you to add extra fields. I am sorry if this was not made clear to you, but nowhere in the documentation have I said that adding extra fields is possible.
    I am able to give excellent support on using and implementing this plugin but I do not give support for making source code changes to the plugin which is what I believe you were trying to do.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘send button not working’ is closed to new replies.